From 14d07f37b1f03ecb512b221faeb93e62dfd34b3d Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Tue, 9 Nov 2010 16:28:29 +0100 Subject: [PATCH] =?utf8?q?Verkn=C3=BCpfungen=20zum=20Unit-Model?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- SL/DB/InvoiceItem.pm | 5 +++++ SL/DB/OrderItem.pm | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/SL/DB/InvoiceItem.pm b/SL/DB/InvoiceItem.pm index 04b28a195..1407c3334 100644 --- a/SL/DB/InvoiceItem.pm +++ b/SL/DB/InvoiceItem.pm @@ -15,6 +15,11 @@ __PACKAGE__->meta->add_relationship( class => 'SL::DB::PriceFactor', column_map => { price_factor_id => 'id' }, }, + unit_obj => { + type => 'one to one', + class => 'SL::DB::Unit', + column_map => { unit => 'name' }, + }, ); # Creates get_all, get_all_count, get_all_iterator, delete_all and update_all. diff --git a/SL/DB/OrderItem.pm b/SL/DB/OrderItem.pm index 9ee5743ef..1e17d364c 100644 --- a/SL/DB/OrderItem.pm +++ b/SL/DB/OrderItem.pm @@ -15,6 +15,11 @@ __PACKAGE__->meta->add_relationship( class => 'SL::DB::PriceFactor', column_map => { price_factor_id => 'id' }, }, + unit_obj => { + type => 'one to one', + class => 'SL::DB::Unit', + column_map => { unit => 'name' }, + }, ); # Creates get_all, get_all_count, get_all_iterator, delete_all and update_all. -- 2.20.1