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 by @JsonProperty value of entity field not working when upgrade from v2.1.10 to v2.2.4 [DATACMNS-1662] #2083

spring-projects-issues opened this issue Jan 29, 2020 · 3 comments


Copy link

@spring-projects-issues spring-projects-issues commented Jan 29, 2020

ahmadabulaban opened DATACMNS-1662 and commented

I was using the spring-data v2.1.10 and i have the following entity


public class RequestEntity extends ResourceSupport {

@JsonProperty(value = "id")
@Column(name = "ID", nullable = false)
private Long requestId;

@Column(name = "STATUS", nullable = false)
private String status;




I was able to use "id" as a sort field in Pageable of QuerydslPredicateExecutor findAll method :

public ResponseEntity<PagedResources<RequestEntity>> listRequest(@PageableDefault(sort = "id") Pageable pageable){
Predicate predicate;


return ResponseEntity.ok(toPagedResource(repository.findAll(predicate, pageable)));

private PagedResources<RequestEntity> toPagedResource(Page<RequestEntity> page) {
    return new PagedResources<>(page.getContent(), PageMapper.createPageMetaData(page));

After upgrading to v2.2.4 the findAll return the following exception No property id found for type RequestEntity

Affects: 2.2.4 (Moore SR4)

Copy link

@mp911de mp911de commented Jan 26, 2021

@ahmadabulaban can you attach the full stack trace? Also, the property name you're wanting to sort by is requestId. id is just the name under which the property requestId gets serialized to JSON.

@mp911de mp911de added status: waiting-for-feedback and removed in: repository type: bug labels Jan 26, 2021
Copy link

@spring-projects-issues spring-projects-issues commented Feb 2, 2021

If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.

@spring-projects-issues spring-projects-issues added the status: feedback-reminder label Feb 2, 2021
Copy link

@spring-projects-issues spring-projects-issues commented Feb 9, 2021

Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open the issue.

@spring-projects-issues spring-projects-issues removed status: waiting-for-feedback status: feedback-reminder labels Feb 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

No branches or pull requests

3 participants