Din kode bør være noget, der ligner dette, forudsat at Book e Project er i relation (Book
tilhører Project
)
$this->Book->find
(
'all',
array
(
'fields' => array('Book.value', 'Project.name'),
'conditions' => array
(
'Book.created IN (SELECT MAX(Book.created) FROM books Book WHERE Book.user_id = 1)',
'Book.user_id' => 1
),
'group' => 'Project.name'
)
);