Basically the above code says: var $hasOne = array(), array();
Which doesn't make sense. My guess is, that it needs to be:
var $hasOne = array (
"Author" =>
array("classname" => "Author",
"dependent" =>
false,
"foreignKey" =>
"book_id"),
"AssistantAuthor" =>
array("classname" =>
"AssistantAuthor",
"dependent" =>
false,
"foreignKey" =>
"book_id"),
);
But I get the error: "Cannot instantiate non-existent class:
AssistantAuthor"
I neither understand the book_id. This field does not exist in the
author table. But there are two fields in the book table which are
mainauthor_id and assistantauthor_id.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---