From: Moritz Bunkus Date: Wed, 25 Jun 2014 09:50:22 +0000 (+0200) Subject: FollowUp(Access)-Rose-Models: sinnvollere Namen für Relationships X-Git-Tag: release-3.2.0beta~411^2~7 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=68e4c3a2d381e0b1b5b8cf317a6bed22973aace9;p=kivitendo-erp.git FollowUp(Access)-Rose-Models: sinnvollere Namen für Relationships --- diff --git a/SL/DB/MetaSetup/FollowUp.pm b/SL/DB/MetaSetup/FollowUp.pm index bda14ec5a..a6702b68a 100644 --- a/SL/DB/MetaSetup/FollowUp.pm +++ b/SL/DB/MetaSetup/FollowUp.pm @@ -24,14 +24,14 @@ __PACKAGE__->meta->primary_key_columns([ 'id' ]); __PACKAGE__->meta->allow_inline_column_values(1); __PACKAGE__->meta->foreign_keys( - created_for => { + created_by => { class => 'SL::DB::Employee', - key_columns => { created_for_user => 'id' }, + key_columns => { created_by => 'id' }, }, - employee => { + created_for => { class => 'SL::DB::Employee', - key_columns => { created_by => 'id' }, + key_columns => { created_for_user => 'id' }, }, note => { diff --git a/SL/DB/MetaSetup/FollowUpAccess.pm b/SL/DB/MetaSetup/FollowUpAccess.pm index 43d538610..c2fccb1e9 100644 --- a/SL/DB/MetaSetup/FollowUpAccess.pm +++ b/SL/DB/MetaSetup/FollowUpAccess.pm @@ -17,12 +17,12 @@ __PACKAGE__->meta->columns( __PACKAGE__->meta->primary_key_columns([ 'id' ]); __PACKAGE__->meta->foreign_keys( - employee => { + to_follow_ups_by => { class => 'SL::DB::Employee', key_columns => { what => 'id' }, }, - employee_obj => { + with_access => { class => 'SL::DB::Employee', key_columns => { who => 'id' }, }, diff --git a/scripts/rose_auto_create_model.pl b/scripts/rose_auto_create_model.pl index 4f3360bd6..8106576a8 100755 --- a/scripts/rose_auto_create_model.pl +++ b/scripts/rose_auto_create_model.pl @@ -69,7 +69,8 @@ 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 => 'employee', }, + follow_ups => { created_for_user => 'created_for', created_by => 'created_by', }, + follow_up_access => { who => 'with_access', what => 'to_follow_ups_by', }, periodic_invoices_configs => { oe_id => 'order' }, },