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.
 
   4 package SL::DB::AuthGroup;
 
   8 use SL::DB::MetaSetup::AuthGroup;
 
   9 use SL::DB::AuthGroupRight;
 
  11 # Creates get_all, get_all_count, get_all_iterator, delete_all and update_all.
 
  12 __PACKAGE__->meta->make_manager_class;
 
  14 __PACKAGE__->meta->schema('auth');
 
  16 __PACKAGE__->meta->add_relationship(
 
  18     type      => 'many to many',
 
  19     map_class => 'SL::DB::AuthUserGroup',
 
  24     type       => 'one to many',
 
  25     class      => 'SL::DB::AuthGroupRight',
 
  26     column_map => { id => 'group_id' },
 
  30 __PACKAGE__->meta->initialize;
 
  33   my @logins = map { $_->login } $_[0]->users;
 
  34   return @logins ? @{ SL::DB::Manager::Employee->get_all(query => [ login => \@logins ]) } : ();