It seems like you have recursive on. Try using the following:
debug($this->Product->find('all', array(
'contain' => 'ProductRelation',
'recursive' => -1
)));
If that works for you, you should start adding containable
to the AppModel
class and setting the recursive
property to -1
. This will ensure you only ever get the results you request.
NB: Cake does not join
for HABTM, so you can not use ProductRelation
in any conditions.