From 7ade1b958af3fdd2b7532973da0e7825d23eda96 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Thu, 3 Mar 2011 10:46:25 +0100 Subject: [PATCH] Model SL::DB::Prices in SL::DB::Price umbenannt Conflicts: SL/DB/Helper/Mappings.pm SL/DB/Part.pm --- SL/DB/Helper/ALL.pm | 2 +- SL/DB/Helper/Mappings.pm | 2 +- SL/DB/MetaSetup/{Prices.pm => Price.pm} | 2 +- SL/DB/Part.pm | 5 +++++ SL/DB/{Prices.pm => Price.pm} | 4 ++-- 5 files changed, 10 insertions(+), 5 deletions(-) rename SL/DB/MetaSetup/{Prices.pm => Price.pm} (96%) rename SL/DB/{Prices.pm => Price.pm} (83%) diff --git a/SL/DB/Helper/ALL.pm b/SL/DB/Helper/ALL.pm index f5973b3b7..c030bed92 100644 --- a/SL/DB/Helper/ALL.pm +++ b/SL/DB/Helper/ALL.pm @@ -56,7 +56,7 @@ use SL::DB::PeriodicInvoice; use SL::DB::PeriodicInvoicesConfig; use SL::DB::PriceFactor; use SL::DB::Pricegroup; -use SL::DB::Prices; +use SL::DB::Price; use SL::DB::Printer; use SL::DB::Project; use SL::DB::PurchaseInvoice; diff --git a/SL/DB/Helper/Mappings.pm b/SL/DB/Helper/Mappings.pm index 477190448..7f7c475fd 100644 --- a/SL/DB/Helper/Mappings.pm +++ b/SL/DB/Helper/Mappings.pm @@ -77,7 +77,7 @@ my %lxoffice_package_names = ( payment_terms => 'payment_term', periodic_invoices => 'periodic_invoice', periodic_invoices_configs => 'periodic_invoices_config', - prices => 'prices', + prices => 'price', price_factors => 'price_factor', pricegroup => 'pricegroup', printers => 'Printer', diff --git a/SL/DB/MetaSetup/Prices.pm b/SL/DB/MetaSetup/Price.pm similarity index 96% rename from SL/DB/MetaSetup/Prices.pm rename to SL/DB/MetaSetup/Price.pm index 819d14c6f..bb6f0fd38 100644 --- a/SL/DB/MetaSetup/Prices.pm +++ b/SL/DB/MetaSetup/Price.pm @@ -1,6 +1,6 @@ # This file has been auto-generated. Do not modify it; it will be overwritten # by rose_auto_create_model.pl automatically. -package SL::DB::Prices; +package SL::DB::Price; use strict; diff --git a/SL/DB/Part.pm b/SL/DB/Part.pm index 8ec7b3b1b..fd55e0207 100644 --- a/SL/DB/Part.pm +++ b/SL/DB/Part.pm @@ -31,6 +31,11 @@ __PACKAGE__->meta->add_relationships( class => 'SL::DB::PriceFactor', column_map => { price_factor_id => 'id' }, }, + prices => { + type => 'one to many', + class => 'SL::DB::Price', + column_map => { id => 'parts_id' }, + }, ); __PACKAGE__->meta->initialize; diff --git a/SL/DB/Prices.pm b/SL/DB/Price.pm similarity index 83% rename from SL/DB/Prices.pm rename to SL/DB/Price.pm index 45d54a0b2..9029dff3c 100644 --- a/SL/DB/Prices.pm +++ b/SL/DB/Price.pm @@ -1,11 +1,11 @@ # This file has been auto-generated only because it didn't exist. # Feel free to modify it at will; it will not be overwritten automatically. -package SL::DB::Prices; +package SL::DB::Price; use strict; -use SL::DB::MetaSetup::Prices; +use SL::DB::MetaSetup::Price; # Creates get_all, get_all_count, get_all_iterator, delete_all and update_all. __PACKAGE__->meta->make_manager_class; -- 2.20.1