I have an application with the following models and associations, I'd
like to traverse this association but am unsure how best and where
best to go about it:

Project hasMany Actors, Authors
Actor belongsTo User, Character, Project
Author belongsTo Project, User
User hasMany Authors, Actors
Character hasMany Actors

When I'm viewing the page of a specific project I'd like two lists,
one of the Actors (and their associated user, if they have one) and
one of the characters that have been used in any of the other projects
any of the other authors of the current project have been involved in.

The first list is trivial, Cake's done it for me already. However, the
second list is more complicated in that I haven't been able to find
out how to do it.

So my question is: Can Cake get me this second list automatically by
following associations, something like [Project]->[Authors]-
>[Projects]->[Actors]->[Characters]? If not, do I have to write the
SELECT somewhere myself? If the latter is the case, where's best to
write it; the controller, the object? I'm guessing it shouldn't go in
the view :)

Thanks for any help anyone can give me,
Dan.


--~--~---------~--~----~------------~-------~--~----~
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