X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/541676120a6d930b57d4bcb3193a096b70194c3e..187c4ee192da9281f42800e6ac8ae08f23d9a9d6:/SL/DB/Part.pm diff --git a/SL/DB/Part.pm b/SL/DB/Part.pm index e98b0c4d7..0f855231e 100644 --- a/SL/DB/Part.pm +++ b/SL/DB/Part.pm @@ -76,6 +76,12 @@ __PACKAGE__->meta->add_relationships( 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;