The ORM uses the QB to generate queries, thus you can just use DB::expr(). Any conditions are expected to be columns, thus to use something else you have to use DB::expr() here. To use the OP's code as an example:Would it be bad or even possible to have a "db::expr" type of method for orm? It would solve a lot of headaches.
'prices' => array(
'key_from' => 'prodid',
'model_to' => 'Model_Prices',
'key_to' => 'prodid',
'cascade_save' => false,
'cascade_delete' => false,
'conditions' => array(
'where' => array(
array('prices.price', '>', DB::expr(0))
)
It looks like you're new here. If you want to get involved, click one of these buttons!