Hi there,

I have two models, User and Review, each Review has one user associated
with it, so I use the "hasone" in Review's model, however once I use
hasone, any find() or findAll() from Review's controller returns empty
array... it works if hasone is removed, anyone knows why?


<?php
class User extends AppModel {
var $name = 'User';
}
?>


<?php
class Review extends AppModel {
var $name = 'Review';


var $hasOne = array('User' =>
array('className' => 'User',
'conditions' => '',
'order' => '',
'dependent' => false,
'foreignKey' => 'user_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
-~----------~----~----~----~------~----~------~--~---

Reply via email to