AndrewSimm
Well-known member
I have a list of football players and within their profile (stored in their table) I list their home state abbreviation. I also use this entity on one of my widgets, and I would like to list the full state name. To give me the ability to list the full state I created a "State" table/entity and added all 50 states. In this widget I would like to join the state from player to the manage_short_state from my State table/entity. Basically, I need the relation to not join on keys, so I don't have to replace the state with state id in the players profile.
Here is the relation I am adding to player; however, it's not working.
Here is the relation I am adding to player; however, it's not working.
PHP:
'State' => [
'entity' => 'CIS\Backend:State',
'type' => self::TO_ONE,
'conditions' => [
['manage_state_short', '=', '$state']
],
'primary' => true
]