From 4ad8ecea0ba37ba748bb16b347a097e407c864d7 Mon Sep 17 00:00:00 2001 From: "G. Richardson" Date: Sun, 7 Aug 2016 22:52:27 +0200 Subject: [PATCH] =?utf8?q?Manager=20f=C3=BCr=20PartsGroup=20mit=20sort=5Fs?= =?utf8?q?pec?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- SL/DB/Manager/PartsGroup.pm | 19 +++++++++++++++++++ SL/DB/PartsGroup.pm | 4 +--- 2 files changed, 20 insertions(+), 3 deletions(-) create mode 100644 SL/DB/Manager/PartsGroup.pm diff --git a/SL/DB/Manager/PartsGroup.pm b/SL/DB/Manager/PartsGroup.pm new file mode 100644 index 000000000..24e016c33 --- /dev/null +++ b/SL/DB/Manager/PartsGroup.pm @@ -0,0 +1,19 @@ +package SL::DB::Manager::PartsGroup; + +use strict; + +use SL::DB::Helper::Manager; +use base qw(SL::DB::Helper::Manager); + +use SL::DB::Helper::Sorted; + +sub object_class { 'SL::DB::PartsGroup' } + +__PACKAGE__->make_manager_methods; + +sub _sort_spec { + return ( default => [ 'partsgroup', 1 ], + columns => { SIMPLE => 'ALL' }); +} + +1; diff --git a/SL/DB/PartsGroup.pm b/SL/DB/PartsGroup.pm index ed3c164fe..f40c5de96 100644 --- a/SL/DB/PartsGroup.pm +++ b/SL/DB/PartsGroup.pm @@ -6,6 +6,7 @@ package SL::DB::PartsGroup; use strict; use SL::DB::MetaSetup::PartsGroup; +use SL::DB::Manager::PartsGroup; __PACKAGE__->meta->add_relationship( custom_variable_configs => { @@ -16,9 +17,6 @@ __PACKAGE__->meta->add_relationship( __PACKAGE__->meta->initialize; -# Creates get_all, get_all_count, get_all_iterator, delete_all and update_all. -__PACKAGE__->meta->make_manager_class; - sub displayable_name { my $self = shift; -- 2.20.1