I would like to know if it is possible to use setRelation() with the main table pk several times.
Suppose I have:
- A
user
table with ‘id’ as pk. - A table named
auth_identities
containing user’semail
associated with every user viauser_id
fk. - Another table named
auth_groups_users
contains the users’group
, again using auser_id
fk.
I would like to show both columns, email
and group
, along with the main user
table fields.
Problem is when I use something like this:
$crud->setRelation('id', 'auth_identities', 'email')
$crud->setRelation('id', 'auth_groups_users', 'group')
Only the group
column is shown in place of id
.
How can I show two or more columns always having the pk id
as $fieldName
first parameter?
Any workaround (without relying on views)?
TIA.