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::PartsGroup;
8 use SL::DB::MetaSetup::PartsGroup;
9 use SL::DB::Manager::PartsGroup;
10 use SL::DB::Helper::ActsAsList;
12 __PACKAGE__->meta->add_relationship(
13 custom_variable_configs => {
14 type => 'many to many',
15 map_class => 'SL::DB::CustomVariableConfigPartsgroup',
19 __PACKAGE__->meta->initialize;
21 sub displayable_name {
24 return join ' ', grep $_, $self->id, $self->partsgroup;
29 require SL::DB::Customer;
33 push @errors, $::locale->text('The description is missing.') if $self->id and !$self->partsgroup;
40 die 'not an accessor' if @_ > 1;
42 return 1 unless $self->id;
46 SL::DB::CustomVariableConfigPartsgroup
49 for my $class (@relations) {
50 eval "require $class";
51 return 0 if $class->_get_manager_class->get_all_count(query => [ partsgroup_id => $self->id ]);