ENXF NET
Administrator
Staff member
Administrator
Moderator
+Lifetime VIP+
S.V.I.P.S Member
S.V.I.P Member
V.I.P Member
Collaborate
Registered
- Joined
- Nov 13, 2018
- Messages
- 24,761
- Points
- 823
Reputation:
I'm trying to wrap my head around entity framework today. I see you can specify a relationship like this:
PHP:
However, if the table I have has a column called created_by_user_id, how...
Read more
Continue reading...
PHP:
Code:
$structure->relations = [
'User' => [
'entity' => 'XF:User',
'type' => self::TO_ONE,
'conditions' => 'user_id',
'primary' => true,
]
];
$structure->defaultWith = [
'User'
];
However, if the table I have has a column called created_by_user_id, how...
Read more
Continue reading...