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.
 
   8 use SL::DB::MetaSetup::Unit;
 
  10 # Creates get_all, get_all_count, get_all_iterator, delete_all and update_all.
 
  11 __PACKAGE__->meta->make_manager_class;
 
  13 __PACKAGE__->meta->add_relationships(
 
  16     class        => 'SL::DB::Unit',
 
  17     column_map   => { base_unit => 'name' },
 
  21 __PACKAGE__->meta->initialize;
 
  28   return $self if !$self->base_unit || $self->name eq $self->base_unit;
 
  29   return $self->base->unit_class;
 
  32 sub convertible_units {
 
  35     sort { $a->sortkey <=> $b->sortkey }
 
  36     grep { $_->unit_class->name eq $self->unit_class->name }
 
  37     @{ SL::DB::Manager::Unit->get_all }