From 997c9f2390c5cf472b221b75d55e1c866612219a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sven=20Sch=C3=B6ling?= Date: Fri, 22 Oct 2010 14:12:05 +0200 Subject: [PATCH] Parts: buchungsgruppen und partsgroup verlinkt. --- SL/DB/Part.pm | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/SL/DB/Part.pm b/SL/DB/Part.pm index 1acd8ef20..ce9738f32 100644 --- a/SL/DB/Part.pm +++ b/SL/DB/Part.pm @@ -18,6 +18,11 @@ __PACKAGE__->meta->add_relationships( class => 'SL::DB::Assembly', column_map => { id => 'id' }, }, + partsgroup => { + type => 'one to one', + class => 'SL::DB::PartsGroup', + column_map => { partsgroup_id => 'id' }, + }, ); __PACKAGE__->meta->initialize; @@ -103,6 +108,11 @@ sub available_units { shift->unit_obj->convertible_units; } +# autogenerated accessor is slightly off... +sub buchungsgruppe { + shift->buchungsgruppen(@_); +} + 1; __END__ -- 2.20.1