Hello, I have a ModelA with a belongTo with a condition, like:
class ModelA extends AppModel { var $name = 'ModelA'; var $belongsTo = array( 'ModelB' => array ('type' => 'inner', 'conditions' => array ( 'ModelB.id' => '1' ) ) ); } calling ModelA->find('all) the query is executed as follow: SELECT ... AS ... FROM `model_a` AS `ModelA` inner JOIN `model_b` AS `ModelB` ON (`ModelA`.`model_b_id` = `ModelB`.`id` AND `ModelB`.`id` = 1) WHERE 1 = 1 but calling: ModelA->find('list') the query is executed in an other way (which I think is wrong): SELECT ... AS ... FROM `model_a` AS `ModelA` WHERE 1 = 1 without the JOIN and the ON condition. Is this a bug? Is something wrong in my code? Thanks and Regards, Mariano.- Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en