I would say it depends on the purpose of the find. As your find is related to the person, you want information about him/her and his/her attributes (such as shifts and areas) and it's OK to have repeated attribute data. If your find was about the area you'd do it another way. I think your original find looks right.
Jeremy Burns [email protected] On 12 Apr 2010, at 07:51, paws_galuten wrote: >> One thing you could do is *not* contain Area and, instead, run a >> find() on that separately. In your view, when listing the shifts, get >> the Area.name from the Shift.area_id. Something like: >> >> $this->set('data', $this->Person->find(..., 'contain' => >> array('Shift') ... >> >> $this->set('areas', $this->Person->Shift->Area->find('list')); >> > > hmm... but then I would get all of the areas, and what I want is just > the areas that are associated with the shifts from that person. > If there were 50 areas, it would be better to list 10 of them twice > each than to list all 50 only once... know what i mean? > > 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. 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
