cakePHP, multiple hasOne in a single model
- by jason
say you have 3 models : user, hair_color, and eye_color
user hasOne hair_color
user also hasOne eye_color
however
var $hasOne = 'hair_color';
var $hasOne = 'eye_color';
obviously wont work. So how do you implement many hasOne relationships in a single model?
I assume the answer is in the cookbook, Im going over that area now, I suspect it has something to do with passing an array to $hasOne, but no example of doing this.