I need a data-filter based on a child model HABTM relation condition.
My table structure is as following:
Project hasMany TaskGroup hasMany Task hasAndBelongsToMany User.
I need my find function to get only the Projects with specific TaskGroups that contain Tasks assigned to some User.id. In other words, I need my Tasks filtered by User.id, and structured as Project -> TaskGroup -> Task. Is there a way Cake model bindings handle this, or do I need to write the joins manually?