Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove query.Sorting from registration.go #19962

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Its-Maniaco
Copy link

Fixes #19569

Signed-off-by: Divya Pamecha <21123621+Its-Maniaco@users.noreply.github.com>
@Its-Maniaco
Copy link
Author

@zyyw @stonezdj can you please review the pr

@Vad1mo Vad1mo enabled auto-merge (squash) February 12, 2024 09:59
if sort.DESC {
sortKey += " DESC"
}
qs = qs.OrderBy(sortKey)
Copy link
Contributor

@stonezdj stonezdj Apr 9, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Supposing there are two columns in the query.Sorts, the query will always sort with the last column.
Prefer to use this style:

qs = qs.OrderBy("-is_default", "-create_time")

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.

Removing Query.Sorting as it we are deprecating it
5 participants