I need a little assistance with a join over 3 tables. I have the following Models (User > Profile > Infogroup > Information): - User (hasMany Profile) - Profile (belongsTo User, hasMany Infogroup) - Infogroup (belongsTo Profile, hasMany Information) - Information (belongsTo Infogroup)
The relationships are defined in the model classes, and there is no problem getting the associated data, when for example fetching a User. However, what do I need to do to get all Information that belongs to a specific User? I.e. all rows from the informations table "where Information.infogroup_id = Infogroup_id AND Infogroup.profile_id = Profile.id AND Profile.user_id = XYZ"? --~--~---------~--~----~------------~-------~--~----~ 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---