-# 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::Employee;
use strict;
use SL::DB::MetaSetup::Employee;
+use SL::DB::Manager::Employee;
-# Creates get_all, get_all_count, get_all_iterator, delete_all and update_all.
-__PACKAGE__->meta->make_manager_class;
1;
--- /dev/null
+package SL::DB::Manager::Employee;
+
+use strict;
+
+use SL::DB::Helpers::Manager;
+use base qw(SL::DB::Helpers::Manager);
+
+sub object_class { 'SL::DB::Employee' }
+
+__PACKAGE__->make_manager_methods;
+
+sub current {
+ return undef unless $::form && $::form->{login};
+ return shift->find_by(login => $::form->{login});
+}
+
+1;