My Reservation Model hasAndBelongsToMany Profile Model. I want to find Profiles using Reservation.item_id = $id When I get the data, the data show all the datas in Profile.
$profiles = $this->Profile->find('all', array(
'contain' => array(
'Reservation' => array(
'conditions' => array('Reservation.item_id' => $id)
)
),
'order' => 'Profile.order ASC'
));
print_r($profiles);
What is the matter????????...