Skip to content

Address the issue of missing sort criteria in the case of Entity class (TypedSort) #2377

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

Closed
wants to merge 7 commits into from

Conversation

HiuKwok
Copy link

@HiuKwok HiuKwok commented May 15, 2021

Closes #2103
This is a Pull Request to address the issue reported on DATACMNS-1704, to add a getter method for property orders on both classes Sort and its child class TypedSort in order to handle the case that the user invokes multiple sort orders with custom entity class.

  • You have read the Spring Data contribution guidelines.
  • You use the code formatters provided here and have them applied to your changes. Don’t submit any formatting related changes.
  • You submit test cases (unit or integration tests) that back your changes.
  • You added yourself as author in the headers of the classes you touched. Amend the date range in the Apache license header if needed. For new types, add the license header (copy from another file and set the current year only).

@pivotal-cla
Copy link

@HiuKwok Please sign the Contributor License Agreement!

Click here to manually synchronize the status of this Pull Request.

See the FAQ for frequently asked questions.

@pivotal-cla
Copy link

@HiuKwok Thank you for signing the Contributor License Agreement!

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label May 15, 2021
@schauder schauder requested a review from mp911de May 17, 2021 14:45
mp911de added a commit that referenced this pull request Jun 10, 2021
We now retain properly the collection of orders by using accessor methods instead of relying on using the orders field. TypedSort orders are not using the orders field, instead they iterate over recorded persistent property paths.

Closes #2103
Original pull request: #2377.
mp911de added a commit that referenced this pull request Jun 10, 2021
We now retain properly the collection of orders by using accessor methods instead of relying on using the orders field. TypedSort orders are not using the orders field, instead they iterate over recorded persistent property paths.

Closes #2103
Original pull request: #2377.
@mp911de mp911de added type: bug A general bug and removed status: waiting-for-triage An issue we've not yet triaged labels Jun 10, 2021
mp911de added a commit that referenced this pull request Jun 10, 2021
We now retain properly the collection of orders by using accessor methods instead of relying on using the orders field. TypedSort orders are not using the orders field, instead they iterate over recorded persistent property paths.

Closes #2103
Original pull request: #2377.
@mp911de mp911de added this to the 2.4.10 (2020.0.10) milestone Jun 10, 2021
@mp911de
Copy link
Member

mp911de commented Jun 10, 2021

Thanks for your pull request. We can fix the issue with less code changes. Instead of exposing getOrders, we can call this.toList(). Given the huge number of commits, we're going to pick your test only and apply a fix from our side.

@mp911de mp911de closed this Jun 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug A general bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Sort.and() does not handle TypedSort without explicit order [DATACMNS-1704]
4 participants