-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Pageable Always Adding From Entity to Sort Field Name #2960
Comments
Looks like this issue not only regresses against #1066, but touches on #664, an older ticket that may have been the origin of handling JOINs with aliases in Sorts. By registering JOIN aliases with the same mechanism as SELECT aliases, we are easily able to handle any Sort property that starts with an alias and have them skip getting the FROM alias applied. Feel free to review the linked PR. |
This is certainly impacted by #3002. |
Based on #3010 (comment), #3002 is no longer relevant. |
Merged to |
Regression of #1066
Error now reoccurs on Spring Boot 3.1
When using
@Query
in a JPA repository along withPageable
and attempting to sort on a field in a joined entity, the from entity gets prepended to the sort field. For example, if I do the following query:If I pass a
PageRequest
sorting on a field in the from entity (Customer
), everything will work fine:However, if I simply decide to sort by a field in the
ProductOrder
entity with thisPageRequest
:I will get the following error:
c.
was prepended onto the sort field.Updated reproducer project: Archive.zip
The text was updated successfully, but these errors were encountered: