mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
[PR #8188] Add support for ORDER BY CASE #10847
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Original Pull Request: https://github.com/doctrine/orm/pull/8188
State: closed
Merged: Yes
I would like to propose the feature of custom ordering by utilizing a case expression. The most common platforms all support it.
At the moment when custom ordering is needed most of the time one must fall back to platform specific functions (like
FIELDfor mysql). This feature would provide custom ordering out of the box for all supported platforms.Validated platforms:
I've added 2 tests that validates using a simple and generic case expressions.
Any thoughts?