]> wagnertech.de Git - mfinanz.git/blobdiff - SL/DB/Manager/Unit.pm
Manager-Model für Unit-DB-Model mit Sortierfunktion hinzufügen
[mfinanz.git] / SL / DB / Manager / Unit.pm
diff --git a/SL/DB/Manager/Unit.pm b/SL/DB/Manager/Unit.pm
new file mode 100644 (file)
index 0000000..8b3c138
--- /dev/null
@@ -0,0 +1,21 @@
+package SL::DB::Manager::Unit;
+
+use strict;
+
+use SL::DB::Helper::Manager;
+use base qw(SL::DB::Helper::Manager);
+
+use SL::DB::Helper::Sorted;
+
+sub object_class { 'SL::DB::Unit' }
+
+__PACKAGE__->make_manager_methods;
+
+sub _sort_spec {
+  return ( default => [ 'sortkey', 1 ],
+           columns => { SIMPLE => 'ALL',
+                        name   => 'lower(name)',
+                      });
+}
+
+1;