We have plots and beans that can be planted into the plots.
I am absolutely determined to use the following to find all plots the owner has, with a bean inside them.
$plots = $this->Plot->findAllByOwnerAndBean_id(uid, '> 0');
However, it gives me the SQL WHERE
Plot.
owner= '15' AND
Plot.
bean_id= '> 0'
This suggests it may be impossible, but I don't feel it's definitive. (potentially, even relevant as 2.2?) And it may be, so the question is two-fold:
How do I get what I want out of the findBy, and if I really can't, how could I avoid less code than the following, which I can confirm works?
$plots = $this->Plot->find('all', array(
'conditions' => array(
'owner' => uid,
'bean_id >' => 0
)
));