Re: Problem with hasOne and belongsTo using non-standard foreignKeys

2008-06-19 Thread Robert
My bad - stupid mistake. Thanks for help! Robert On 18 Cze, 20:18, floob <[EMAIL PROTECTED]> wrote: > Hey Robert, > You've got it a bit backwards.  If Item contains all the foreign keys, > then Item _belongsTo_ ItemType and ItemStatus.  Type and Status would > both "haveOne" Item  From the book'

Re: Problem with hasOne and belongsTo using non-standard foreignKeys

2008-06-18 Thread floob
Hey Robert, You've got it a bit backwards. If Item contains all the foreign keys, then Item _belongsTo_ ItemType and ItemStatus. Type and Status would both "haveOne" Item From the book's section on Associations : belongsTo: "foreignKey: the name of the foreign key found in the _current_ model

Problem with hasOne and belongsTo using non-standard foreignKeys

2008-06-18 Thread Robert
Hi, I tried to search through the group archive but did not find any solution. My problem is pretty simple and probably solution is also simple for all who dealt with cake relations. I have 3 database tables: items with columns: id, type, status item_types with columns: id, name item_statuses wi