type => 'one to many',
class => 'SL::DB::AssortmentItem',
column_map => { id => 'assortment_id' },
+ manager_args => { sort_by => 'position' },
},
history_entries => {
type => 'one to many',
column_map => { id => 'part_id' },
manager_args => { with_objects => [ 'shop' ] },
},
+ last_price_update => {
+ type => 'one to one',
+ class => 'SL::DB::PartsPriceHistory',
+ column_map => { id => 'part_id' },
+ manager_args => { sort_by => 'valid_from DESC', limit => 1 },
+ },
);
__PACKAGE__->meta->initialize;