Skip to content


DBAL-859: OraclePlatform: rownum should not be used directly in WHERE clausule #2096

doctrinebot opened this Issue · 3 comments

2 participants


Jira issue originally created by user mariusz.jaskolka:

At 90% of cases when we use ROWNUM in WHERE clause it will work correctly, but sometimes not. I noticed that that is why Doctrine sometimes works incorrect.

"That is why a query in the following form is almost certainly an error:

select *
from emp
where ROWNUM <= 5
order by sal desc;

I prepared modified OraclePlatform.php with solution (attachment) - rownum is being compared after all operations.


Comment created by @deeky666:

[~mariusz.jaskolka] can you please provide an example where the current implementation fails? We have functional tests LIMIT queries in DBAL but they run fine on Oracle. I need more information to be able to reproduce this problem.


Comment created by @ocramius:

This issue is missing a valid test case - marking as incomplete.


Issue was closed with resolution "Incomplete"

@doctrinebot doctrinebot added the Bug label
@Ocramius Ocramius was assigned by doctrinebot
@doctrinebot doctrinebot closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.