From: Moritz Bunkus Date: Thu, 31 Mar 2016 13:31:32 +0000 (+0200) Subject: S:D:FollowUp: Namen der Relationen created_by…/created_for… eindeutig gemacht X-Git-Tag: release-3.4.1~273 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=0b33cc602d717933791d06cb64f65dea2a7c2354;p=kivitendo-erp.git S:D:FollowUp: Namen der Relationen created_by…/created_for… eindeutig gemacht Die Spalten heißen leider created_by und created_for_user. Damit es bei der Benutzung nicht zu Verwirrungen zwischen Spaltennamen und den Namen der Relationships kommt, werden die Relationshipnamen schlicht eindeutig umbenannt. Bisher hat kein Rose-Code diese Relationships genutzt. Nur der CustomerVendor-Controller hat die Spaltennamen benutzt. --- diff --git a/SL/DB/MetaSetup/FollowUp.pm b/SL/DB/MetaSetup/FollowUp.pm index b9119fb83..1659f8f4c 100644 --- a/SL/DB/MetaSetup/FollowUp.pm +++ b/SL/DB/MetaSetup/FollowUp.pm @@ -24,12 +24,12 @@ __PACKAGE__->meta->primary_key_columns([ 'id' ]); __PACKAGE__->meta->allow_inline_column_values(1); __PACKAGE__->meta->foreign_keys( - created_by => { + created_by_employee => { class => 'SL::DB::Employee', key_columns => { created_by => 'id' }, }, - created_for => { + created_for_employee => { class => 'SL::DB::Employee', key_columns => { created_for_user => 'id' }, }, diff --git a/scripts/rose_auto_create_model.pl b/scripts/rose_auto_create_model.pl index d58a84602..9334934ae 100755 --- a/scripts/rose_auto_create_model.pl +++ b/scripts/rose_auto_create_model.pl @@ -70,7 +70,7 @@ our %foreign_key_name_map = ( orderitems => { parts_id => 'part', trans_id => 'order', }, delivery_order_items => { parts_id => 'part' }, invoice => { parts_id => 'part' }, - follow_ups => { created_for_user => 'created_for', created_by => 'created_by', }, + follow_ups => { created_for_user => 'created_for_employee', created_by => 'created_by_employee', }, follow_up_access => { who => 'with_access', what => 'to_follow_ups_by', }, periodic_invoices_configs => { oe_id => 'order' },