Modelverknüpfungen
authorMoritz Bunkus <m.bunkus@linet-services.de>
Mon, 22 Nov 2010 12:53:05 +0000 (13:53 +0100)
committerMoritz Bunkus <m.bunkus@linet-services.de>
Thu, 13 Jan 2011 12:57:21 +0000 (13:57 +0100)
SL/DB/DeliveryOrder.pm
SL/DB/Invoice.pm
SL/DB/Order.pm

index 724a01d..b65bf3e 100644 (file)
@@ -15,6 +15,14 @@ __PACKAGE__->meta->add_relationship(orderitems => { type         => 'one to many
                                                     column_map   => { id => 'trans_id' },
                                                     manager_args => { with_objects => [ 'part' ] }
                                                   },
+                                    shipto => { type       => 'one to one',
+                                                class      => 'SL::DB::Shipto',
+                                                column_map => { shipto_id => 'shipto_id' },
+                                              },
+                                    department => { type       => 'one to one',
+                                                    class      => 'SL::DB::Department',
+                                                    column_map => { department_id => 'id' },
+                                                  },
                                    );
 
 __PACKAGE__->meta->initialize;
index 401d088..25393c6 100644 (file)
@@ -33,6 +33,26 @@ __PACKAGE__->meta->add_relationship(
     class      => 'SL::DB::PaymentTerm',
     column_map => { payment_id => 'id' },
   },
+  contact      => {
+    type       => 'one to one',
+    class      => 'SL::DB::Contact',
+    column_map => { cp_id => 'cp_id' },
+  },
+  shipto       => {
+    type       => 'one to one',
+    class      => 'SL::DB::Shipto',
+    column_map => { shipto_id => 'shipto_id' },
+  },
+  department   => {
+    type       => 'one to one',
+    class      => 'SL::DB::Department',
+    column_map => { department_id => 'id' },
+  },
+  language     => {
+    type       => 'one to one',
+    class      => 'SL::DB::Language',
+    column_map => { language_id => 'id' },
+  },
 );
 
 __PACKAGE__->meta->initialize;
index daab5dd..61a49d4 100644 (file)
@@ -41,6 +41,26 @@ __PACKAGE__->meta->add_relationship(
     class      => 'SL::DB::PaymentTerm',
     column_map => { payment_id => 'id' },
   },
+  contact      => {
+    type       => 'one to one',
+    class      => 'SL::DB::Contact',
+    column_map => { cp_id => 'cp_id' },
+  },
+  shipto       => {
+    type       => 'one to one',
+    class      => 'SL::DB::Shipto',
+    column_map => { shipto_id => 'shipto_id' },
+  },
+  department   => {
+    type       => 'one to one',
+    class      => 'SL::DB::Department',
+    column_map => { department_id => 'id' },
+  },
+  language     => {
+    type       => 'one to one',
+    class      => 'SL::DB::Language',
+    column_map => { language_id => 'id' },
+  },
 );
 
 __PACKAGE__->meta->initialize;