Skip to content

Conversation

@jonmldr
Copy link

@jonmldr jonmldr commented Jul 26, 2025

This MR ensures that a sorted orderBy item is always prioritized as the first in the list, especially when it is already present in the QueryBuilder. This ensures that the query prioritizes the sorted property first, as intended.

The change guarantees that array_unshift is always used. When the sorted orderBy item is already present in the QueryBuilder, it removes the duplicate item instead of modifying the direction of the existing one.

@jonmldr jonmldr changed the title Prioritize sorted order by item when already present in querybuilder Prioritize sorted orderBy item when already present in QueryBuilder Jul 26, 2025
@garak
Copy link
Collaborator

garak commented Jul 26, 2025

Please add tests

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants