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

sort repository return sort divided by sub class [DATAREST-1314] #1674

Closed
spring-projects-issues opened this issue Dec 5, 2018 · 5 comments
Closed
Assignees
Labels
in: repository status: declined type: bug

Comments

@spring-projects-issues
Copy link

@spring-projects-issues spring-projects-issues commented Dec 5, 2018

sante85 opened DATAREST-1314 and commented

when i sort a superclass repository: EnvironmentRepository, I expect a global sorting and not a sort divided by subclass. There is a workaroud?

 

Thanks


Affects: 3.1.3 (Lovelace SR3)

Attachments:

@spring-projects-issues
Copy link
Author

@spring-projects-issues spring-projects-issues commented Dec 5, 2018

Oliver Drotbohm commented

For general questions, please use StackOverflow. What you see at play here is not Spring Data sorting by type but the result being arranged in a HAL-compliant way. The collections returned need a key within the _embedded clause and by default, that's the uncapitalized simple class name. You might want to use @Rel on the types involved to use the same relation. That would keep all results under a single key

@spring-projects-issues
Copy link
Author

@spring-projects-issues spring-projects-issues commented Dec 5, 2018

sante85 commented

ok, can you post an example?

 

i use

@RepositoryRestResource
public interface EnvironmentRepository extends PagingAndSortingRepository<Environment, Long>, JpaSpecificationExecutor<Environment> {

}

@spring-projects-issues
Copy link
Author

@spring-projects-issues spring-projects-issues commented Dec 5, 2018

Oliver Drotbohm commented

Again, this is not a support forum, thanks

@spring-projects-issues
Copy link
Author

@spring-projects-issues spring-projects-issues commented Dec 5, 2018

sante85 commented

and for bug 1310, what are timings?

@spring-projects-issues
Copy link
Author

@spring-projects-issues spring-projects-issues commented Dec 5, 2018

sante85 commented

i not kwon how to write problem in google...please give me a support such as a query to do

@spring-projects-issues spring-projects-issues added type: bug status: declined in: repository labels Dec 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: repository status: declined type: bug
Projects
None yet
Development

No branches or pull requests

2 participants