Created
June 18, 2013 21:44
-
-
Save proofek/5809737 to your computer and use it in GitHub Desktop.
SupplierRelate.php - definition of the 2 fields required for the relationship without middle table
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* Name relate field | |
* * link point at the link field defined below | |
* * make sure the field name matches the pattern <bean_name>_name | |
*/ | |
$dictionary['Demo_SupplierContactDetails']['fields']['demo_suppliers_name'] = array( | |
'required' => true, | |
'source' => 'non-db', | |
'name' => 'demo_suppliers_name', | |
'vname' => 'LBL_SUPPLIER_NAME', | |
'type' => 'relate', | |
'rname' => 'name', | |
'id_name' => 'demo_suppliers_id', | |
'join_name' => 'demo_suppliers', | |
'link' => 'demo_suppliers', | |
'table' => 'demo_suppliers', | |
'isnull' => 'true', | |
'module' => 'Demo_Suppliers', | |
); | |
/* | |
* Linking id field | |
* * make sure the field name matches the pattern <bean_name>_id | |
*/ | |
$dictionary['Demo_SupplierContactDetails']['fields']['demo_suppliers_id'] = array( | |
'name' => 'demo_suppliers_id', | |
'rname' => 'id', | |
'vname' => 'LBL_SUPPLIER_ID', | |
'type' => 'id', | |
'table' => 'demo_suppliers', | |
'isnull' => 'true', | |
'module' => 'demo_suppliers', | |
'dbType' => 'id', | |
'reportable' => false, | |
'massupdate' => false, | |
'duplicate_merge' => 'disabled', | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment