I'm using PhalconPHP 2.0.7's \Phalcon\Mvc\Model::findFirst() with conditions on Oracle database and always getting 0 result. When I attached event manager to log SQL to a file, it seems that PhalconPHP adds "ROWNUM <= 0" to the SQL, which is of course means 0 result. Adding
limit parameter doesn't help.
Sample SQL (table structure omitted):
SELECT * FROM (SELECT Z1.*, ROWNUM PHALCON_RN FROM (/***** effective SQL *****/) Z1 WHERE ROWNUM <= 0)
Resource::findFirst(array( 'STAFF_NO = :staff:', 'bind' => array( 'staff' => $staffNo ) ));
How to fix this? Is this a bug that I need to lodge somewhere? TQ