Is Profile associated with ProfilesUser or with User? For containable
to return ProfilesUser you'll need to make sure that Profile hasMany
ProfilesUser (You bind them at runtime).

Why would you want ProfilesUser and not User?

On Jul 22, 9:16 am, Amit <[email protected]> wrote:
> profiles has many users.
> users has many profiles.
>
> I just want to do a query which will join profiles & profiles_users
> table and not join with users table.
> so i do the following:
>
> $this->Profile->Behaviors->attach('Containable');
> $this->Profile->contain("ProfilesUser");  //I dont want to do "User"
> here, bcz it fires up 2 queries.
> $this->data = $this->Profile->find('all');
>
> However, its not working, it just querying profiles table. i want
> something
> like profiles join with profiles_users.
>
> whats wrong??
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to