Parts: buchungsgruppen und partsgroup verlinkt.
authorSven Schöling <s.schoeling@linet-services.de>
Fri, 22 Oct 2010 12:12:05 +0000 (14:12 +0200)
committerSven Schöling <s.schoeling@linet-services.de>
Fri, 22 Oct 2010 12:20:04 +0000 (14:20 +0200)
SL/DB/Part.pm

index 1acd8ef..ce9738f 100644 (file)
@@ -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__