Revision 4c9d45bf
Von Moritz Bunkus vor fast 13 Jahren hinzugefügt
SL/DB/Manager/Unit.pm | ||
---|---|---|
1 |
package SL::DB::Manager::Unit; |
|
2 |
|
|
3 |
use strict; |
|
4 |
|
|
5 |
use SL::DB::Helper::Manager; |
|
6 |
use base qw(SL::DB::Helper::Manager); |
|
7 |
|
|
8 |
use SL::DB::Helper::Sorted; |
|
9 |
|
|
10 |
sub object_class { 'SL::DB::Unit' } |
|
11 |
|
|
12 |
__PACKAGE__->make_manager_methods; |
|
13 |
|
|
14 |
sub _sort_spec { |
|
15 |
return ( default => [ 'sortkey', 1 ], |
|
16 |
columns => { SIMPLE => 'ALL', |
|
17 |
name => 'lower(name)', |
|
18 |
}); |
|
19 |
} |
|
20 |
|
|
21 |
1; |
SL/DB/Unit.pm | ||
---|---|---|
1 |
# This file has been auto-generated only because it didn't exist. |
|
2 |
# Feel free to modify it at will; it will not be overwritten automatically. |
|
3 |
|
|
4 | 1 |
package SL::DB::Unit; |
5 | 2 |
|
6 | 3 |
use strict; |
7 | 4 |
|
8 | 5 |
use SL::DB::MetaSetup::Unit; |
9 |
|
|
10 |
# Creates get_all, get_all_count, get_all_iterator, delete_all and update_all. |
|
11 |
__PACKAGE__->meta->make_manager_class; |
|
6 |
use SL::DB::Manager::Unit; |
|
12 | 7 |
|
13 | 8 |
__PACKAGE__->meta->add_relationships( |
14 | 9 |
base => { |
Auch abrufbar als: Unified diff
Manager-Model für Unit-DB-Model mit Sortierfunktion hinzufügen