Hello,
I don't know how I can achieve this..
I want to find all Persons, but order them by the 'Due_Date' of the
'Group' they are assigned to (hasAndBelongsToMany).
$this->Person->bindModel(array('hasAndBelongsToMany' => array('Group'
=> array(
'className' => 'Group',
'joinTable' => 'group_person',
'foreignKey' => 'person_ID',
'associationForeignKey' => 'group_ID',
'conditions' => '',
'fields' => array('ID', 'Due_Date'),
))));
$this->Person->findAll('','','Group.Due_Date'); does not work.
Setting 'order' => 'group.Due_Date' in the HABTM definition does not
work either.
Has anybody done this and can give me a hint?
Kind regards
Ralph
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" 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
-~----------~----~----~----~------~----~------~--~---