My Models are related as follows:
Post BELONGS_TO Parent
Parent HAS_MANY ParentAdmin
Now I wish to find all Parent admins of all post if a post's attribute's value is met. The equivalent sql query is :
SELECT parent_admins.* FROM posts
LEFT JOIN parents AS Parent ON Parent.id = posts.target_id
LEFT JOIN parent_admins ON parent_admins.parent_id = Parent.id
WHERE posts.admin_notification = 0 AND Parent.maxtime > posts.created
Assuming Models are linked in cakephp accordingly and recursive = 2
, what will be the condition array in find query?