I am using containables for it already. The point for me is that if
two shifts come from the same area, that same area info will be listed
for each shift. Somehow I'd like to get that area info only once...

Right now it looks something like this:

Array
(
    [Person] => Array
        (
            [id] => 1
            [first] => Thelonious
            [last] => Monk
        )

    [Shift] => Array
        (
            [0] => Array
                (
                    [id] => 6
                    [area_id] => 1
                    etc...

                    [Area] => Array
                        (
                            [id] => 1
                            [name] => Kitchen
                            etc...
                        )

                )

            [1] => Array
                (
                    [id] => 3
                    [area_id] => 1
                    etc...

                    [Area] => Array
                        (
                            [id] => 1
                            [name] => Kitchen
                            etc...
                        )

                )
        )
)

so you see... I get the kitchen info as many times as i have a shift
in the kitchen... not sure how to get around this...



On Apr 11, 1:45 pm, Jon Bennett <[email protected]> wrote:
> > Person hasMany Shift and Shift belongsTo Area.
>
> > When I do a find() on Person, I get the shifts, and also the area for
> > each shift. That's cool, but many of the shifts are from the same area
> > and in that case I have the same area data listed many times. Is this
> > not a big deal, or is there some other way, like have a separate array
> > of areas (but only those areas who's shifts the person has)?
>
> http://book.cakephp.org/view/474/Containable
>
> --
> 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.

Reply via email to