i'm trying to access only those cities where country id = 2 and city id = 5
$this->Country->find('all', array(
'conditions' => array('Country.id' => 2),
'contain' => array(
'City' => array(
'conditions' => array('City.id' => 5)))));
I tried this to get city with id 5 but all cities are listed where country id is 2.
I know this is not good approach to get cities using this query . I can use
$this->City->findById('5');
$this->City->find('all',
array('conditions' => array('id' => 5 , 'country_id' => 2)));
But I want to know if I wanna use above way then how it can be used in proper way because some where else it can be used in future.