> $this->Person->id = $id;
> $this->Person-
>>contain('Shift.Area','ResidentCategory','OffDay','FloatingShift.Area','House');
> $this->set('person', $this->Person->find('first'));
>
> One thing to note that adds a level of complexity is that there are
> sifts and there are floating shifts. A shift can come from the same
> area as a floating shift, so there's even more chance for duplicate
> area data.
You could limit Shift.area to one if it's a hasMany,
$this->Person->id = $id;
$this->Person->contain(
'Shift.Area'=>array('limit'=>1),
'ResidentCategory',
'OffD'
);
If you want only unique values, you could use distinct in the fields
array for the Shift.Area.
J
--
jon bennett - www.jben.net - blog.jben.net
Check out the new CakePHP Questions site http://cakeqs.org and help others with
their CakePHP related questions.
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
To unsubscribe, reply using "remove me" as the subject.