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

Multi Order By Allow Using Fields Queried via Join Tables #559

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

michaelcaulley
Copy link

@michaelcaulley michaelcaulley commented Nov 23, 2023

  • OrderBy terms for multiOrder + pagination would not properly handle terms that were joined. They would assume the field existed as a column on the table.
  • Added a test to verify the change

Related to: ent/ent#3841

go.mod Outdated Show resolved Hide resolved
@michaelcaulley
Copy link
Author

The tests should pass now if the checks are run again.

column = matches[0]
}
return column
}
Copy link
Author

Choose a reason for hiding this comment

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

using getColumnNameForField allows to order by joined data rather than only columns on the table

@michaelcaulley michaelcaulley force-pushed the multi-order-by-fix branch 2 times, most recently from 186bbe6 to 394ddfd Compare February 12, 2024 17:37
@michaelcaulley michaelcaulley changed the title Multi order by fix Multi Order By Allow Join Tables Feb 12, 2024
@michaelcaulley michaelcaulley changed the title Multi Order By Allow Join Tables Multi Order By Allow Using Fields Queried via Join Tables Feb 12, 2024
codelite7 added a commit to codelite7/contrib that referenced this pull request Sep 19, 2024
… Code lifted from this PR which has been open for a while but never merged ent#559
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.

1 participant