This is what I want to do:
SELECT * FROM `potential_matches` INNER JOIN release ON release.asin = potential_matches.asin WHERE release.id = 6;
This is what i have so far:
class Release extends AppModel {
public $actsAs = array('Containable');
public $hasMany = array('PotentialMatch');
}
class PotentialMatch extends AppModel {
public $actsAs = array('Containable');
public $belongsTo = array('Release');
}
$this->Release->find('all', array(
'contain' => array('PotentialMatch')
'conditions' => array(
'Message.to' => 6
)
));
What am I doing wrong?
If don’t pass it the
typevalue it will use LEFT JOIN by default. See this link