S:D:FollowUp: Namen der Relationen created_by…/created_for… eindeutig gemacht
authorMoritz Bunkus <m.bunkus@linet-services.de>
Thu, 31 Mar 2016 13:31:32 +0000 (15:31 +0200)
committerMoritz Bunkus <m.bunkus@linet-services.de>
Thu, 31 Mar 2016 13:33:28 +0000 (15:33 +0200)
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.

SL/DB/MetaSetup/FollowUp.pm
scripts/rose_auto_create_model.pl

index b9119fb..1659f8f 100644 (file)
@@ -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' },
   },
index d58a846..9334934 100755 (executable)
@@ -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' },