Each model should just be listed as a string :
var $hasOne = array(
'Artist',
'Author',
'Rating',
'Publisher'
);
Also, you only need to use inner arrays if you want to be detailed.
var $hasOne = array(
'Artist' => array('className' => '...'),
'Author' => array('className' => '...'),
'Rating' => array('className' => '...'),
'Publisher' => array('className' => '...')
);
On Mon, Aug 17, 2009 at 9:24 AM, fightinggeek<[email protected]> wrote:
>
>
>
> I'm trying to create a page for organizing comic books. One table needs to
> have multiple hasone relations and I can't figure out how to do it. Any help
> would be appreciated. Here's what I have so far:
>
> <?
> class Comic extends AppModel {
> var $name = 'Comic';
> var $belongsTo = array('User');
> var $hasOne = array('Artist'),
> array('Author'),
> array('Rating'),
> array('Publisher');
> }
> ?>
>
> --
> View this message in context:
> http://www.nabble.com/CakePHP-multiple-hasone-relations-issue-tp25006016p25006016.html
> Sent from the CakePHP mailing list archive at Nabble.com.
>
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CakePHP" 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
-~----------~----~----~----~------~----~------~--~---