I use the 2.0.9 version of Phalcon in Windows 7 with WampServer. I used the scaffolding to generate the controllers, views and models. When findFirst or findFirstById does not return any results. In my logger the query is something like this:
SELECT * FROM (SELECT Z1. *, ROWNUM PHALCON_RN FROM (SELECT USERS.ID, USERS.CPF, USERS.PASSWORD, USERS.MUSTCHANGEPASSWORD, USERS.EMAIL, USERS.NOME, USERS.STATUS, USERS.SDEL, USERS.CREATEBY, USERS.CREATEIN, USERS.UPDATEBY, USERS.UPDATEIN FROM USERS WHERE USERS.ID =: 0 USERS.SDEL AND IS NULL) WHERE ROWNUM Z1 <= 0)
This 'ROWNUM <= 0' should come as 'ROWNUM> 1'? Or am I mistaken?
When I use the SQLDeveloper changing the '<=' with '>', you get the expected result.