I am trying to save a hasOne relation, but i cannot seem to get it working, the cookbook isn't helpful either with different explanations on what should be done.
i have a Users table:
and a Zones table:
'foreignKey' => 'user_id',
'joinType' => 'INNER'
'foreignKey' => 'user_id'
On editing a user I would like to get a dropdown with Zones in the Zones table. If selecting a Zone and saving the user_id should be filled in at the Zones table.
Is a zone has a user_id it can no longer be used for other users.
I baked a edit controller and view. What should i do to get this working, if at all possible?