From: Sven Schöling Date: Tue, 25 Jun 2013 16:13:21 +0000 (+0200) Subject: MetaSetup: Folgerun um die Foreign Keys umzudrehen X-Git-Tag: release-3.1.0beta1~260 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=4bcf880408fcc4270084f36520d4fd2cfd509fbc;p=kivitendo-erp.git MetaSetup: Folgerun um die Foreign Keys umzudrehen --- diff --git a/SL/DB/MetaSetup/Currency.pm b/SL/DB/MetaSetup/Currency.pm index c07ef656b..40bb6ee6e 100644 --- a/SL/DB/MetaSetup/Currency.pm +++ b/SL/DB/MetaSetup/Currency.pm @@ -17,20 +17,6 @@ __PACKAGE__->meta->primary_key_columns([ 'id' ]); __PACKAGE__->meta->unique_keys([ 'name' ]); -__PACKAGE__->meta->relationships( - ap => { - class => 'SL::DB::PurchaseInvoice', - column_map => { id => 'currency_id' }, - type => 'one to many', - }, - - ar => { - class => 'SL::DB::Invoice', - column_map => { id => 'currency_id' }, - type => 'one to many', - }, -); - # __PACKAGE__->meta->initialize; 1; diff --git a/SL/DB/MetaSetup/Customer.pm b/SL/DB/MetaSetup/Customer.pm index 2d8a750fd..bd54c07e5 100644 --- a/SL/DB/MetaSetup/Customer.pm +++ b/SL/DB/MetaSetup/Customer.pm @@ -70,6 +70,16 @@ __PACKAGE__->meta->foreign_keys( class => 'SL::DB::Currency', key_columns => { currency_id => 'id' }, }, + + language_obj => { + class => 'SL::DB::Language', + key_columns => { language_id => 'id' }, + }, + + payment => { + class => 'SL::DB::PaymentTerm', + key_columns => { payment_id => 'id' }, + }, ); # __PACKAGE__->meta->initialize; diff --git a/SL/DB/MetaSetup/DeliveryOrder.pm b/SL/DB/MetaSetup/DeliveryOrder.pm index 0877f90d0..f6e1aabfb 100644 --- a/SL/DB/MetaSetup/DeliveryOrder.pm +++ b/SL/DB/MetaSetup/DeliveryOrder.pm @@ -61,11 +61,36 @@ __PACKAGE__->meta->foreign_keys( key_columns => { customer_id => 'id' }, }, + department => { + class => 'SL::DB::Department', + key_columns => { department_id => 'id' }, + }, + + employee => { + class => 'SL::DB::Employee', + key_columns => { employee_id => 'id' }, + }, + globalproject => { class => 'SL::DB::Project', key_columns => { globalproject_id => 'id' }, }, + language => { + class => 'SL::DB::Language', + key_columns => { language_id => 'id' }, + }, + + salesman => { + class => 'SL::DB::Employee', + key_columns => { salesman_id => 'id' }, + }, + + shipto => { + class => 'SL::DB::Shipto', + key_columns => { shipto_id => 'shipto_id' }, + }, + vendor => { class => 'SL::DB::Vendor', key_columns => { vendor_id => 'id' }, diff --git a/SL/DB/MetaSetup/DeliveryOrderItem.pm b/SL/DB/MetaSetup/DeliveryOrderItem.pm index c92c98a57..608e3a32e 100644 --- a/SL/DB/MetaSetup/DeliveryOrderItem.pm +++ b/SL/DB/MetaSetup/DeliveryOrderItem.pm @@ -44,11 +44,21 @@ __PACKAGE__->meta->foreign_keys( key_columns => { delivery_order_id => 'id' }, }, - parts => { + part => { class => 'SL::DB::Part', key_columns => { parts_id => 'id' }, }, + price_factor_obj => { + class => 'SL::DB::PriceFactor', + key_columns => { price_factor_id => 'id' }, + }, + + pricegroup => { + class => 'SL::DB::Pricegroup', + key_columns => { pricegroup_id => 'id' }, + }, + project => { class => 'SL::DB::Project', key_columns => { project_id => 'id' }, diff --git a/SL/DB/MetaSetup/Department.pm b/SL/DB/MetaSetup/Department.pm index 527234dab..244bb7989 100644 --- a/SL/DB/MetaSetup/Department.pm +++ b/SL/DB/MetaSetup/Department.pm @@ -19,20 +19,6 @@ __PACKAGE__->meta->primary_key_columns([ 'id' ]); __PACKAGE__->meta->allow_inline_column_values(1); -__PACKAGE__->meta->relationships( - ap => { - class => 'SL::DB::PurchaseInvoice', - column_map => { id => 'department_id' }, - type => 'one to many', - }, - - ar => { - class => 'SL::DB::Invoice', - column_map => { id => 'department_id' }, - type => 'one to many', - }, -); - # __PACKAGE__->meta->initialize; 1; diff --git a/SL/DB/MetaSetup/Draft.pm b/SL/DB/MetaSetup/Draft.pm index 374c19e9c..0a24c4b48 100644 --- a/SL/DB/MetaSetup/Draft.pm +++ b/SL/DB/MetaSetup/Draft.pm @@ -22,6 +22,13 @@ __PACKAGE__->meta->primary_key_columns([ 'id' ]); __PACKAGE__->meta->allow_inline_column_values(1); +__PACKAGE__->meta->foreign_keys( + employee => { + class => 'SL::DB::Employee', + key_columns => { employee_id => 'id' }, + }, +); + # __PACKAGE__->meta->initialize; 1; diff --git a/SL/DB/MetaSetup/Dunning.pm b/SL/DB/MetaSetup/Dunning.pm index 019662bc4..6e1bb6d76 100644 --- a/SL/DB/MetaSetup/Dunning.pm +++ b/SL/DB/MetaSetup/Dunning.pm @@ -28,6 +28,11 @@ __PACKAGE__->meta->primary_key_columns([ 'id' ]); __PACKAGE__->meta->allow_inline_column_values(1); __PACKAGE__->meta->foreign_keys( + dunning_config => { + class => 'SL::DB::DunningConfig', + key_columns => { dunning_config_id => 'id' }, + }, + fee_interest_ar => { class => 'SL::DB::Invoice', key_columns => { fee_interest_ar_id => 'id' }, diff --git a/SL/DB/MetaSetup/DunningConfig.pm b/SL/DB/MetaSetup/DunningConfig.pm index 602ae8ea5..c041917fb 100644 --- a/SL/DB/MetaSetup/DunningConfig.pm +++ b/SL/DB/MetaSetup/DunningConfig.pm @@ -28,20 +28,6 @@ __PACKAGE__->meta->columns( __PACKAGE__->meta->primary_key_columns([ 'id' ]); -__PACKAGE__->meta->relationships( - ar => { - class => 'SL::DB::Invoice', - column_map => { id => 'dunning_config_id' }, - type => 'one to many', - }, - - dunning => { - class => 'SL::DB::Dunning', - column_map => { id => 'dunning_config_id' }, - type => 'one to many', - }, -); - # __PACKAGE__->meta->initialize; 1; diff --git a/SL/DB/MetaSetup/Employee.pm b/SL/DB/MetaSetup/Employee.pm index 63b0f1a40..7fabdc79a 100644 --- a/SL/DB/MetaSetup/Employee.pm +++ b/SL/DB/MetaSetup/Employee.pm @@ -33,32 +33,6 @@ __PACKAGE__->meta->unique_keys([ 'login' ]); __PACKAGE__->meta->allow_inline_column_values(1); -__PACKAGE__->meta->relationships( - ap => { - class => 'SL::DB::PurchaseInvoice', - column_map => { id => 'employee_id' }, - type => 'one to many', - }, - - ar => { - class => 'SL::DB::Invoice', - column_map => { id => 'employee_id' }, - type => 'one to many', - }, - - ar_objs => { - class => 'SL::DB::Invoice', - column_map => { id => 'salesman_id' }, - type => 'one to many', - }, - - drafts => { - class => 'SL::DB::Draft', - column_map => { id => 'employee_id' }, - type => 'one to many', - }, -); - # __PACKAGE__->meta->initialize; 1; diff --git a/SL/DB/MetaSetup/FollowUp.pm b/SL/DB/MetaSetup/FollowUp.pm index b102f249c..8f83c6c73 100644 --- a/SL/DB/MetaSetup/FollowUp.pm +++ b/SL/DB/MetaSetup/FollowUp.pm @@ -33,13 +33,10 @@ __PACKAGE__->meta->foreign_keys( class => 'SL::DB::Employee', key_columns => { created_by => 'id' }, }, -); -__PACKAGE__->meta->relationships( - follow_up_links => { - class => 'SL::DB::FollowUpLink', - column_map => { id => 'follow_up_id' }, - type => 'one to many', + note => { + class => 'SL::DB::Note', + key_columns => { note_id => 'id' }, }, ); diff --git a/SL/DB/MetaSetup/FollowUpLink.pm b/SL/DB/MetaSetup/FollowUpLink.pm index 00e25ecbe..820c16b0d 100644 --- a/SL/DB/MetaSetup/FollowUpLink.pm +++ b/SL/DB/MetaSetup/FollowUpLink.pm @@ -22,6 +22,13 @@ __PACKAGE__->meta->primary_key_columns([ 'id' ]); __PACKAGE__->meta->allow_inline_column_values(1); +__PACKAGE__->meta->foreign_keys( + follow_up => { + class => 'SL::DB::FollowUp', + key_columns => { follow_up_id => 'id' }, + }, +); + # __PACKAGE__->meta->initialize; 1; diff --git a/SL/DB/MetaSetup/GLTransaction.pm b/SL/DB/MetaSetup/GLTransaction.pm index c8019ebcf..54dca9aac 100644 --- a/SL/DB/MetaSetup/GLTransaction.pm +++ b/SL/DB/MetaSetup/GLTransaction.pm @@ -43,14 +43,6 @@ __PACKAGE__->meta->foreign_keys( }, ); -__PACKAGE__->meta->relationships( - gl => { - class => 'SL::DB::GLTransaction', - column_map => { id => 'storno_id' }, - type => 'one to many', - }, -); - # __PACKAGE__->meta->initialize; 1; diff --git a/SL/DB/MetaSetup/GenericTranslation.pm b/SL/DB/MetaSetup/GenericTranslation.pm index 46a19caf5..94556c76c 100644 --- a/SL/DB/MetaSetup/GenericTranslation.pm +++ b/SL/DB/MetaSetup/GenericTranslation.pm @@ -18,6 +18,13 @@ __PACKAGE__->meta->columns( __PACKAGE__->meta->primary_key_columns([ 'id' ]); +__PACKAGE__->meta->foreign_keys( + language => { + class => 'SL::DB::Language', + key_columns => { language_id => 'id' }, + }, +); + # __PACKAGE__->meta->initialize; 1; diff --git a/SL/DB/MetaSetup/Invoice.pm b/SL/DB/MetaSetup/Invoice.pm index 2dcbb9937..8a942fc45 100644 --- a/SL/DB/MetaSetup/Invoice.pm +++ b/SL/DB/MetaSetup/Invoice.pm @@ -68,16 +68,56 @@ __PACKAGE__->meta->foreign_keys( key_columns => { cp_id => 'cp_id' }, }, + currency => { + class => 'SL::DB::Currency', + key_columns => { currency_id => 'id' }, + }, + customer => { class => 'SL::DB::Customer', key_columns => { customer_id => 'id' }, }, + department => { + class => 'SL::DB::Department', + key_columns => { department_id => 'id' }, + }, + + dunning_config => { + class => 'SL::DB::DunningConfig', + key_columns => { dunning_config_id => 'id' }, + }, + + employee => { + class => 'SL::DB::Employee', + key_columns => { employee_id => 'id' }, + }, + globalproject => { class => 'SL::DB::Project', key_columns => { globalproject_id => 'id' }, }, + language => { + class => 'SL::DB::Language', + key_columns => { language_id => 'id' }, + }, + + payment_terms => { + class => 'SL::DB::PaymentTerm', + key_columns => { payment_id => 'id' }, + }, + + salesman => { + class => 'SL::DB::Employee', + key_columns => { salesman_id => 'id' }, + }, + + shipto => { + class => 'SL::DB::Shipto', + key_columns => { shipto_id => 'shipto_id' }, + }, + storno_obj => { class => 'SL::DB::Invoice', key_columns => { storno_id => 'id' }, diff --git a/SL/DB/MetaSetup/InvoiceItem.pm b/SL/DB/MetaSetup/InvoiceItem.pm index d02beb7d0..1ab85ef95 100644 --- a/SL/DB/MetaSetup/InvoiceItem.pm +++ b/SL/DB/MetaSetup/InvoiceItem.pm @@ -45,11 +45,21 @@ __PACKAGE__->meta->primary_key_columns([ 'id' ]); __PACKAGE__->meta->allow_inline_column_values(1); __PACKAGE__->meta->foreign_keys( - parts => { + part => { class => 'SL::DB::Part', key_columns => { parts_id => 'id' }, }, + price_factor_obj => { + class => 'SL::DB::PriceFactor', + key_columns => { price_factor_id => 'id' }, + }, + + pricegroup => { + class => 'SL::DB::Pricegroup', + key_columns => { pricegroup_id => 'id' }, + }, + project => { class => 'SL::DB::Project', key_columns => { project_id => 'id' }, diff --git a/SL/DB/MetaSetup/Language.pm b/SL/DB/MetaSetup/Language.pm index f4ac9a933..4fd03076b 100644 --- a/SL/DB/MetaSetup/Language.pm +++ b/SL/DB/MetaSetup/Language.pm @@ -24,32 +24,6 @@ __PACKAGE__->meta->primary_key_columns([ 'id' ]); __PACKAGE__->meta->allow_inline_column_values(1); -__PACKAGE__->meta->relationships( - ap => { - class => 'SL::DB::PurchaseInvoice', - column_map => { id => 'language_id' }, - type => 'one to many', - }, - - ar => { - class => 'SL::DB::Invoice', - column_map => { id => 'language_id' }, - type => 'one to many', - }, - - customer => { - class => 'SL::DB::Customer', - column_map => { id => 'language_id' }, - type => 'one to many', - }, - - generic_translations => { - class => 'SL::DB::GenericTranslation', - column_map => { id => 'language_id' }, - type => 'one to many', - }, -); - # __PACKAGE__->meta->initialize; 1; diff --git a/SL/DB/MetaSetup/Note.pm b/SL/DB/MetaSetup/Note.pm index 59085cd8c..7d2dd593c 100644 --- a/SL/DB/MetaSetup/Note.pm +++ b/SL/DB/MetaSetup/Note.pm @@ -30,14 +30,6 @@ __PACKAGE__->meta->foreign_keys( }, ); -__PACKAGE__->meta->relationships( - follow_ups => { - class => 'SL::DB::FollowUp', - column_map => { id => 'note_id' }, - type => 'one to many', - }, -); - # __PACKAGE__->meta->initialize; 1; diff --git a/SL/DB/MetaSetup/Order.pm b/SL/DB/MetaSetup/Order.pm index 397db119a..fa4230f3e 100644 --- a/SL/DB/MetaSetup/Order.pm +++ b/SL/DB/MetaSetup/Order.pm @@ -97,11 +97,21 @@ __PACKAGE__->meta->foreign_keys( key_columns => { language_id => 'id' }, }, + payment => { + class => 'SL::DB::PaymentTerm', + key_columns => { payment_id => 'id' }, + }, + salesman => { class => 'SL::DB::Employee', key_columns => { salesman_id => 'id' }, }, + shipto => { + class => 'SL::DB::Shipto', + key_columns => { shipto_id => 'shipto_id' }, + }, + vendor => { class => 'SL::DB::Vendor', key_columns => { vendor_id => 'id' }, diff --git a/SL/DB/MetaSetup/OrderItem.pm b/SL/DB/MetaSetup/OrderItem.pm index dd2fde76e..e48d2bddf 100644 --- a/SL/DB/MetaSetup/OrderItem.pm +++ b/SL/DB/MetaSetup/OrderItem.pm @@ -43,7 +43,7 @@ __PACKAGE__->meta->primary_key_columns([ 'id' ]); __PACKAGE__->meta->allow_inline_column_values(1); __PACKAGE__->meta->foreign_keys( - part => { + parts => { class => 'SL::DB::Part', key_columns => { parts_id => 'id' }, }, @@ -63,7 +63,7 @@ __PACKAGE__->meta->foreign_keys( key_columns => { project_id => 'id' }, }, - order => { + trans => { class => 'SL::DB::Order', key_columns => { trans_id => 'id' }, }, diff --git a/SL/DB/MetaSetup/Part.pm b/SL/DB/MetaSetup/Part.pm index d56c03764..3c5eb76b7 100644 --- a/SL/DB/MetaSetup/Part.pm +++ b/SL/DB/MetaSetup/Part.pm @@ -67,6 +67,21 @@ __PACKAGE__->meta->foreign_keys( key_columns => { buchungsgruppen_id => 'id' }, }, + partsgroup => { + class => 'SL::DB::PartsGroup', + key_columns => { partsgroup_id => 'id' }, + }, + + payment => { + class => 'SL::DB::PaymentTerm', + key_columns => { payment_id => 'id' }, + }, + + price_factor => { + class => 'SL::DB::PriceFactor', + key_columns => { price_factor_id => 'id' }, + }, + unit_obj => { class => 'SL::DB::Unit', key_columns => { unit => 'name' }, diff --git a/SL/DB/MetaSetup/PartsGroup.pm b/SL/DB/MetaSetup/PartsGroup.pm index 292489e19..9c7f02d24 100644 --- a/SL/DB/MetaSetup/PartsGroup.pm +++ b/SL/DB/MetaSetup/PartsGroup.pm @@ -19,14 +19,6 @@ __PACKAGE__->meta->primary_key_columns([ 'id' ]); __PACKAGE__->meta->allow_inline_column_values(1); -__PACKAGE__->meta->relationships( - parts => { - class => 'SL::DB::Part', - column_map => { id => 'partsgroup_id' }, - type => 'one to many', - }, -); - # __PACKAGE__->meta->initialize; 1; diff --git a/SL/DB/MetaSetup/PaymentTerm.pm b/SL/DB/MetaSetup/PaymentTerm.pm index 3eda536ac..83bd6d289 100644 --- a/SL/DB/MetaSetup/PaymentTerm.pm +++ b/SL/DB/MetaSetup/PaymentTerm.pm @@ -25,38 +25,6 @@ __PACKAGE__->meta->primary_key_columns([ 'id' ]); __PACKAGE__->meta->allow_inline_column_values(1); -__PACKAGE__->meta->relationships( - ap => { - class => 'SL::DB::PurchaseInvoice', - column_map => { id => 'payment_id' }, - type => 'one to many', - }, - - ar => { - class => 'SL::DB::Invoice', - column_map => { id => 'payment_id' }, - type => 'one to many', - }, - - customer => { - class => 'SL::DB::Customer', - column_map => { id => 'payment_id' }, - type => 'one to many', - }, - - oe => { - class => 'SL::DB::Order', - column_map => { id => 'payment_id' }, - type => 'one to many', - }, - - parts => { - class => 'SL::DB::Part', - column_map => { id => 'payment_id' }, - type => 'one to many', - }, -); - # __PACKAGE__->meta->initialize; 1; diff --git a/SL/DB/MetaSetup/PeriodicInvoice.pm b/SL/DB/MetaSetup/PeriodicInvoice.pm index 11822c1c7..5346cfdd3 100644 --- a/SL/DB/MetaSetup/PeriodicInvoice.pm +++ b/SL/DB/MetaSetup/PeriodicInvoice.pm @@ -25,6 +25,11 @@ __PACKAGE__->meta->foreign_keys( class => 'SL::DB::Invoice', key_columns => { ar_id => 'id' }, }, + + config => { + class => 'SL::DB::PeriodicInvoicesConfig', + key_columns => { config_id => 'id' }, + }, ); # __PACKAGE__->meta->initialize; diff --git a/SL/DB/MetaSetup/PeriodicInvoicesConfig.pm b/SL/DB/MetaSetup/PeriodicInvoicesConfig.pm index 414918a64..2beb87ab0 100644 --- a/SL/DB/MetaSetup/PeriodicInvoicesConfig.pm +++ b/SL/DB/MetaSetup/PeriodicInvoicesConfig.pm @@ -35,14 +35,10 @@ __PACKAGE__->meta->foreign_keys( class => 'SL::DB::Order', key_columns => { oe_id => 'id' }, }, -); -__PACKAGE__->meta->relationships( - ars => { - map_class => 'SL::DB::PeriodicInvoice', - map_from => 'config', - map_to => 'ar', - type => 'many to many', + printer => { + class => 'SL::DB::Printer', + key_columns => { printer_id => 'id' }, }, ); diff --git a/SL/DB/MetaSetup/PriceFactor.pm b/SL/DB/MetaSetup/PriceFactor.pm index 3d0aa778c..099b6584f 100644 --- a/SL/DB/MetaSetup/PriceFactor.pm +++ b/SL/DB/MetaSetup/PriceFactor.pm @@ -17,26 +17,6 @@ __PACKAGE__->meta->columns( __PACKAGE__->meta->primary_key_columns([ 'id' ]); -__PACKAGE__->meta->relationships( - invoice => { - class => 'SL::DB::InvoiceItem', - column_map => { id => 'price_factor_id' }, - type => 'one to many', - }, - - orderitems => { - class => 'SL::DB::OrderItem', - column_map => { id => 'price_factor_id' }, - type => 'one to many', - }, - - parts => { - class => 'SL::DB::Part', - column_map => { id => 'price_factor_id' }, - type => 'one to many', - }, -); - # __PACKAGE__->meta->initialize; 1; diff --git a/SL/DB/MetaSetup/Pricegroup.pm b/SL/DB/MetaSetup/Pricegroup.pm index c4491c1a4..5536d1547 100644 --- a/SL/DB/MetaSetup/Pricegroup.pm +++ b/SL/DB/MetaSetup/Pricegroup.pm @@ -15,26 +15,6 @@ __PACKAGE__->meta->columns( __PACKAGE__->meta->primary_key_columns([ 'id' ]); -__PACKAGE__->meta->relationships( - delivery_order_items => { - class => 'SL::DB::DeliveryOrderItem', - column_map => { id => 'pricegroup_id' }, - type => 'one to many', - }, - - invoice => { - class => 'SL::DB::InvoiceItem', - column_map => { id => 'pricegroup_id' }, - type => 'one to many', - }, - - orderitems => { - class => 'SL::DB::OrderItem', - column_map => { id => 'pricegroup_id' }, - type => 'one to many', - }, -); - # __PACKAGE__->meta->initialize; 1; diff --git a/SL/DB/MetaSetup/Printer.pm b/SL/DB/MetaSetup/Printer.pm index 739be1dde..f093e5bb5 100644 --- a/SL/DB/MetaSetup/Printer.pm +++ b/SL/DB/MetaSetup/Printer.pm @@ -17,14 +17,6 @@ __PACKAGE__->meta->columns( __PACKAGE__->meta->primary_key_columns([ 'id' ]); -__PACKAGE__->meta->relationships( - periodic_invoices_configs => { - class => 'SL::DB::PeriodicInvoicesConfig', - column_map => { id => 'printer_id' }, - type => 'one to many', - }, -); - # __PACKAGE__->meta->initialize; 1; diff --git a/SL/DB/MetaSetup/PurchaseInvoice.pm b/SL/DB/MetaSetup/PurchaseInvoice.pm index 25727dc92..cddfacf7e 100644 --- a/SL/DB/MetaSetup/PurchaseInvoice.pm +++ b/SL/DB/MetaSetup/PurchaseInvoice.pm @@ -56,11 +56,36 @@ __PACKAGE__->meta->foreign_keys( key_columns => { cp_id => 'cp_id' }, }, + currency => { + class => 'SL::DB::Currency', + key_columns => { currency_id => 'id' }, + }, + + department => { + class => 'SL::DB::Department', + key_columns => { department_id => 'id' }, + }, + + employee => { + class => 'SL::DB::Employee', + key_columns => { employee_id => 'id' }, + }, + globalproject => { class => 'SL::DB::Project', key_columns => { globalproject_id => 'id' }, }, + language => { + class => 'SL::DB::Language', + key_columns => { language_id => 'id' }, + }, + + payment_terms => { + class => 'SL::DB::PaymentTerm', + key_columns => { payment_id => 'id' }, + }, + storno_obj => { class => 'SL::DB::PurchaseInvoice', key_columns => { storno_id => 'id' }, diff --git a/SL/DB/MetaSetup/Shipto.pm b/SL/DB/MetaSetup/Shipto.pm index 0d619eabe..f7b90d825 100644 --- a/SL/DB/MetaSetup/Shipto.pm +++ b/SL/DB/MetaSetup/Shipto.pm @@ -32,26 +32,6 @@ __PACKAGE__->meta->primary_key_columns([ 'shipto_id' ]); __PACKAGE__->meta->allow_inline_column_values(1); -__PACKAGE__->meta->relationships( - ar => { - class => 'SL::DB::Invoice', - column_map => { shipto_id => 'shipto_id' }, - type => 'one to many', - }, - - delivery_orders => { - class => 'SL::DB::DeliveryOrder', - column_map => { shipto_id => 'shipto_id' }, - type => 'one to many', - }, - - oe => { - class => 'SL::DB::Order', - column_map => { shipto_id => 'shipto_id' }, - type => 'one to many', - }, -); - # __PACKAGE__->meta->initialize; 1; diff --git a/SL/DB/MetaSetup/TransferType.pm b/SL/DB/MetaSetup/TransferType.pm index 74a384070..f48c36462 100644 --- a/SL/DB/MetaSetup/TransferType.pm +++ b/SL/DB/MetaSetup/TransferType.pm @@ -21,14 +21,6 @@ __PACKAGE__->meta->primary_key_columns([ 'id' ]); __PACKAGE__->meta->allow_inline_column_values(1); -__PACKAGE__->meta->relationships( - inventory => { - class => 'SL::DB::Inventory', - column_map => { id => 'trans_type_id' }, - type => 'one to many', - }, -); - # __PACKAGE__->meta->initialize; 1;