I'm a bit confused in how CakePHP does it's database relationship.
For a hasOne relationship, according to the documentation:
"User hasOne Profile"
User hasOne Profile
-> profiles.user_id
Array
(
[User] => Array
(
[id] => 121
[name] => Gwoo the Kungwoo
[created] => 2007-05-01 10:31:01
)
[Profile] => Array
(
[id] => 12
[user_id] => 121
[skill] => Baking Cakes
[created] => 2007-05-01 10:31:01
)
)
But isn't this a one to many relation?
For example (I made these table to illustrate my confusion):
In this case then there are 2 profiles belonging to the same user. Doesn't this mean a user hasMany profile?
Would it make more sense if "User hasOne Profile" is
So then this would be "User hasOne Profile" but "Profile hasMany User"?
I'm not sure if I'm understanding this correctly.