gperez gperez

How do I safely override the join_name for a relationship field?

Discussion created by gperez gperez on Feb 26, 2014
Latest reply on Feb 26, 2014 by gperez gperez
A need to define a custom alias for related tables. I can't see that option in Studio. However, it's possible by code, adding something like:

'join_name' => 'oasis_reservations'
Problem is that I'm not being able to add that option without touching the file in Vardefs. I tried creating a new file in /custom/Extension/modules/oasis_Reservations/Ext/Vardefs/ with the following content, but this won't work (maybe because it's being called before the other array definition, and so being overwritten?)
$dictionary["oas_third_party_payment"]["fields"]["oasis_resery_payment_name"]['join_name'] = 'oasis_reservations';
I need to solve this in order to solve this other issue. It's the only problem remaining.
How do I create a field in the list view to search by grandparent relationships?

Thanks in advance.