Saturday, February 28, 2009

habtm - need some clarification

I have a groups, users and tasks models.

Groups has a HABTM to users.
Users has a HABTM to groups.
Users has many tasks.

From the tasks model, I am trying to find out which group the user
belongs to. Once I have this information, I plan to put into a session
variable so I only need to query this once while the user is in
session.

But, how do I make this query efficiently?

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

No comments: