DDC-2730: Natural ordering in QueryBuilder #3417

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

Originally created by @doctrinebot on GitHub (Oct 9, 2013).

Originally assigned to: @Ocramius on GitHub.

Jira issue originally created by user sergio.pavon:

Maybe this is not the best place to ask for a feature supported by doctrine. I apologize if I've chosen wrong channel.
Hi,
I can't find an easy way to do natural text ordering with QueryBuilder. OrderBy lets us order text, but I want to order including accents and other simbols. For instance, if we have this words:
Alabama, Boston, Álamo, Cardiff.
Natural order: Alabama, Álamo, Boston, Cardiff.
But current Doctrine order: Albama, Boston, Cardiff, Álamo.

I know that I can create a custom function or use native query, but I think that natural order often occurs. There are DBMS specific functions like TRANSLATE or REPLACE that can help, but I think that doctrine not support them.

Thank you,
Sergio.

Originally created by @doctrinebot on GitHub (Oct 9, 2013). Originally assigned to: @Ocramius on GitHub. Jira issue originally created by user sergio.pavon: Maybe this is not the best place to ask for a feature supported by doctrine. I apologize if I've chosen wrong channel. Hi, I can't find an easy way to do natural text ordering with QueryBuilder. OrderBy lets us order text, but I want to order including accents and other simbols. For instance, if we have this words: Alabama, Boston, Álamo, Cardiff. Natural order: Alabama, Álamo, Boston, Cardiff. But current Doctrine order: Albama, Boston, Cardiff, Álamo. I know that I can create a custom function or use native query, but I think that natural order often occurs. There are DBMS specific functions like TRANSLATE or REPLACE that can help, but I think that doctrine not support them. Thank you, Sergio.
admin added the Improvement label 2026-01-22 14:19:28 +01:00
admin closed this issue 2026-01-22 14:19:28 +01:00
Author
Owner

@doctrinebot commented on GitHub (Oct 17, 2013):

Comment created by @ocramius:

This depends on the collation of your DB/Table/Column, not on Doctrine itself.

@doctrinebot commented on GitHub (Oct 17, 2013): Comment created by @ocramius: This depends on the collation of your DB/Table/Column, not on Doctrine itself.
Author
Owner

@doctrinebot commented on GitHub (Oct 17, 2013):

Issue was closed with resolution "Invalid"

@doctrinebot commented on GitHub (Oct 17, 2013): Issue was closed with resolution "Invalid"
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#3417