As equipment owner isn't a static value, don't do it statically. Use
beforeFind() to append the condition, or do that in each findAll() call.
-
Olexandr Melnyk,
http://omelnyk.net/
2007/5/26, hashkash <[EMAIL PROTECTED]>:
>
>
> class User extends AppMod
class User extends AppModel
{
var $name = 'User';
var $primaryKey = 'username';
var $hasMany = array ('Equipment'=>
array('className' => 'Equipment',
'conditions'=>
'Equipment.owner='$logged_in_username', >how do I get this
va
HI,
I have 2 models
User and equipment(the owner is a field in the user table).
user hasMany equipment
equipment belongsTo user
equipment hasOne owner.
I need to display all equipment that a user owns when he logs in.
Even if I were to specify it in the conditions part of the association
how d