From 75603a224c1bc962d18e9398972fa3bf2ff77f87 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Fri, 15 Feb 2013 14:50:53 +0100 Subject: [PATCH] Rose-Model Wiederkehrende Rechnungen: Foreign Key "order" nennen, nicht "oe" --- SL/DB/MetaSetup/PeriodicInvoicesConfig.pm | 2 +- SL/DB/PeriodicInvoicesConfig.pm | 10 ---------- scripts/rose_auto_create_model.pl | 2 ++ 3 files changed, 3 insertions(+), 11 deletions(-) diff --git a/SL/DB/MetaSetup/PeriodicInvoicesConfig.pm b/SL/DB/MetaSetup/PeriodicInvoicesConfig.pm index aeaf1c2ed..8860e8c80 100644 --- a/SL/DB/MetaSetup/PeriodicInvoicesConfig.pm +++ b/SL/DB/MetaSetup/PeriodicInvoicesConfig.pm @@ -32,7 +32,7 @@ __PACKAGE__->meta->setup( key_columns => { ar_chart_id => 'id' }, }, - oe => { + order => { class => 'SL::DB::Order', key_columns => { oe_id => 'id' }, }, diff --git a/SL/DB/PeriodicInvoicesConfig.pm b/SL/DB/PeriodicInvoicesConfig.pm index c9ef22285..2b4542a97 100644 --- a/SL/DB/PeriodicInvoicesConfig.pm +++ b/SL/DB/PeriodicInvoicesConfig.pm @@ -4,16 +4,6 @@ use strict; use SL::DB::MetaSetup::PeriodicInvoicesConfig; -__PACKAGE__->meta->add_relationships( - order => { - type => 'many to one', - class => 'SL::DB::Order', - column_map => { oe_id => 'id' }, - }, -); - -__PACKAGE__->meta->initialize; - # Creates get_all, get_all_count, get_all_iterator, delete_all and update_all. __PACKAGE__->meta->make_manager_class; diff --git a/scripts/rose_auto_create_model.pl b/scripts/rose_auto_create_model.pl index 20048f2d4..7aab08393 100755 --- a/scripts/rose_auto_create_model.pl +++ b/scripts/rose_auto_create_model.pl @@ -52,6 +52,8 @@ our %foreign_key_name_map = ( orderitems => { parts => 'part', trans => 'order', }, delivery_order_items => { parts => 'part' }, invoice => { parts => 'part' }, + + periodic_invoices_configs => { oe => 'order' }, ); sub setup { -- 2.20.1