My bad, I'm not good at fast reading after all. There's some unintentional
awful mistakes
in my previous post. Thanks to Larry for his post or there'll be a bigger
problem for the small problem, never the solution because of me :(. The
supposed code:
var $hasOne = array('Author' =>
array('className' => 'Author',
'dependent' => false,
'foreignKey' => book_id'
)
),
array('AssistantAuthor' =>
array('className' => 'AssistantAuthor',
'dependent' => false,
'foreignKey' => 'book_id'
)
);
The FK should be "book_id" because Book hasOne Author and hasOne
AssistantAuthor. Assuming you define Author and AssistantAuthor as different
models. Is it a good practice? That's another problem.
There.
Uwie
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---