Doctrine 1

Bug in select query when executed against postgreSQL