Master Details view Foreign key - BUG ?

taubes

Member
Hi Eugenio,

I think there is bug in the Master Details View when you use a foreign key. The Master Details View works correct when it uses the primary key of the table (i.e. ID). However, when I have an another field containing a foreign key (customer_ID) it uses the primary key (ID) for the Master Details View and not the value from its own field (customer_ID). Since you can set the Master Details View for every field in the table and not just for the primary key field this should not happen. Please help.

Best

Stefan

My Details:
You are using DaDaBIK version 9.2-Monterosso enterprise, installed on Nov 8, 2018 (installation code: 0), the latest version of DaDaBIK is 9.2-Monterosso released on Nov 7, 2018
You are runnning the last release of DaDaBIK
PHP Version: 5.6.38
mysql version: 5.5.5-10.3.10-MariaDB
Web server: Apache/2.4.37 (Unix) OpenSSL/1.0.2p PHP/5.6.38
Client: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.0 Safari/605.1.15
 

eugenio

Administrator
Staff member
Hi Stefan,
the feature is designed to work only on the primary key, it is specified in the in-line help:

"You should fill this property only for the primary key of a table, when you want to enable a master/details view."

Best,
 

taubes

Member
Hi

Thanks so much for the lightning-fast reply that clears this up.

So maybe this be goes on the feature requests as it seems that everything is place to have m/d views on foreign keys as well as primary keys. Alternatively I would hide the feature from other fields from a use point of view this is a bit misleading to have the option on all fields but useable on the primary key.

Great work as always,

Best

Stefan
 

eugenio

Administrator
Staff member
Hello,
I have thought about hiding the options for the other fields, the thing is that in most of the cases users don't change anything (in form configurator) for the primary key field (very often it's an auto-increment field they hide from the forms) and therefore there is chance they will miss the master/details feature entirely.

I will think about the possibilty to add an error message.

Best,
 
Top