From feef731c40b0b06fd7b566f4dcce322bc68b7946 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Thu, 3 Mar 2011 11:06:53 +0100 Subject: [PATCH] =?utf8?q?Sortierfunktion=20f=C3=BCr=20Pricegroup-Model?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- SL/DB/Manager/Pricegroup.pm | 21 +++++++++++++++++++++ SL/DB/Pricegroup.pm | 7 +------ 2 files changed, 22 insertions(+), 6 deletions(-) create mode 100644 SL/DB/Manager/Pricegroup.pm diff --git a/SL/DB/Manager/Pricegroup.pm b/SL/DB/Manager/Pricegroup.pm new file mode 100644 index 000000000..6da4f216b --- /dev/null +++ b/SL/DB/Manager/Pricegroup.pm @@ -0,0 +1,21 @@ +package SL::DB::Manager::Pricegroup; + +use strict; + +use SL::DB::Helper::Manager; +use base qw(SL::DB::Helper::Manager); + +use SL::DB::Helper::Sorted; + +sub object_class { 'SL::DB::Pricegroup' } + +__PACKAGE__->make_manager_methods; + +sub _sort_spec { + return ( default => [ 'pricegroup', 1 ], + columns => { SIMPLE => 'ALL', + map { ( $_ => "lower(pricegroup.${_})" ) } qw(pricegroup), + }); +} + +1; diff --git a/SL/DB/Pricegroup.pm b/SL/DB/Pricegroup.pm index 8c9c3727e..329dc41b2 100644 --- a/SL/DB/Pricegroup.pm +++ b/SL/DB/Pricegroup.pm @@ -1,13 +1,8 @@ -# This file has been auto-generated only because it didn't exist. -# Feel free to modify it at will; it will not be overwritten automatically. - package SL::DB::Pricegroup; use strict; use SL::DB::MetaSetup::Pricegroup; - -# Creates get_all, get_all_count, get_all_iterator, delete_all and update_all. -__PACKAGE__->meta->make_manager_class; +use SL::DB::Manager::Pricegroup; 1; -- 2.20.1