Skip to content

Spring data JPA fails to sort with JSONB column #3563

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
abirami-els opened this issue Aug 7, 2024 · 3 comments
Closed

Spring data JPA fails to sort with JSONB column #3563

abirami-els opened this issue Aug 7, 2024 · 3 comments
Assignees
Labels
status: duplicate A duplicate of another issue

Comments

@abirami-els
Copy link

abirami-els commented Aug 7, 2024

I'm using Spring Data JPA (v3.0.10) to sort and paginate a table in Postgres.

I'm facing issue when I try to sort by JSONB column.

Pageable p = PageRequest.of(1,19, JpaSort.unsafe(Sort.Direction.ASC, "publicationSchedule->>'permissionDeadline'"));

Exception:

Request processing failed: org.springframework.data.mapping.PropertyReferenceException: No property 'publicationSchedule->>'permissionDeadline'' found for type 'Publication'] with root cause
org.springframework.data.mapping.PropertyReferenceException: No property 'publicationSchedule->>'permissionDeadline'' found for type 'Publication'
	at org.springframework.data.mapping.PropertyPath.<init>(PropertyPath.java:90) ~[spring-data-commons-3.2.4.jar:3.2.4]
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Aug 7, 2024
@christophstrobl christophstrobl self-assigned this Aug 7, 2024
@christophstrobl
Copy link
Member

duplicate of: #1997

@christophstrobl christophstrobl added status: duplicate A duplicate of another issue and removed status: waiting-for-triage An issue we've not yet triaged labels Aug 7, 2024
@abirami-els
Copy link
Author

Is this still an open issue?

@mp911de
Copy link
Member

mp911de commented Aug 7, 2024

It is and it will be handled through the referenced ticket.

@mp911de mp911de closed this as not planned Won't fix, can't repro, duplicate, stale Aug 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: duplicate A duplicate of another issue
Projects
None yet
Development

No branches or pull requests

4 participants