这就是我想要做的事情:
SELECT * FROM `potential_matches` INNER JOIN release ON release.asin = potential_matches.asin WHERE release.id = 6;
这是我到目前为止所做的:
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
)
));
我做错了什么?