@OrderBy annotation does not apply #4927

Closed
opened 2026-01-22 14:52:07 +01:00 by admin · 2 comments
Owner

Originally created by @tszymanek on GitHub (Dec 9, 2015).

Originally assigned to: @guilhermeblanco on GitHub.

As stated in my stackoverflow question there appears to be a bug causing the ArrayCollection to be unsorted when I'm retrieving the entity with find(1). The whole thing miraculously works when I use findOneBy(array('id' => 1)). Please check the link mentioned above for further detail.

Hope I wrote this in the right section and it's going to be resolved. Best regards

Originally created by @tszymanek on GitHub (Dec 9, 2015). Originally assigned to: @guilhermeblanco on GitHub. As stated in my [stackoverflow question](http://stackoverflow.com/questions/34122195/sort-arraycollection-with-orderby-annotation-issue) there appears to be a bug causing the ArrayCollection to be unsorted when I'm retrieving the entity with `find(1)`. The whole thing miraculously works when I use `findOneBy(array('id' => 1))`. Please check the link mentioned above for further detail. Hope I wrote this in the right section and it's going to be resolved. Best regards
admin added the Bug label 2026-01-22 14:52:07 +01:00
admin closed this issue 2026-01-22 14:52:07 +01:00
Author
Owner

@dlancea commented on GitHub (May 19, 2016):

This might be related to Issues #4256 and #4739 .

Try removing fetch="EAGER"

@dlancea commented on GitHub (May 19, 2016): This might be related to Issues #4256 and #4739 . Try removing `fetch="EAGER"`
Author
Owner

@guilhermeblanco commented on GitHub (May 19, 2016):

Closing as a duplicate of #4256

@guilhermeblanco commented on GitHub (May 19, 2016): Closing as a duplicate of #4256
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#4927