There is no way to disable 'orderBy' just for some queries, as you'd break
hydration for your entities.


For reference, the code that generates `orderBy` logic is in
https://github.com/doctrine/doctrine2/blob/61ad1bd137bea574dbcfe1ab5ae9e09c02daddd6/lib/Doctrine/ORM/Query/SqlWalker.php#L394-L430



Marco Pivetta

http://twitter.com/Ocramius

http://ocramius.github.com/

On 30 September 2015 at 20:31, Trent Steel <[email protected]> wrote:

> Is there a way to ignore the OrderBy annotations
> <http://doctrine-orm.readthedocs.org/en/latest/tutorials/ordered-associations.html>
> for a specific query?
>
> I have models that use the @OrderBy annotation. However, I want to perform
> a large query but it is automatically applying all the order by's to each
> join. In MySQL, this results in a temporary table. Is there a type hint or
> something I can add to the query to disable the order by?
>
> The order isn't important for the query I want to run.
>
> I found a similar question on Stack Overflow:
> http://stackoverflow.com/questions/28308064/disable-annotated-orderby-in-doctrine-for-one-query
>
> Thanks
>
> --
> You received this message because you are subscribed to the Google Groups
> "doctrine-user" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/doctrine-user.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"doctrine-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/doctrine-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to