Doctrine 1

MySQL Limit implementation leads to incorrect results if the original where clause contains an "OR" operator