Skip to content

Conversation

@JBodkin-Amphora
Copy link

I've noted a few issues with keyset pagination when using hierarchical idclasses that I believe was introduced when Jakarta Persistence changed the greaterThan/lessThan methods on the criteriabuilder to take a Comparable. I've written some code to extract the attribute paths so that the underlying values can be extracted instead of the entity.

Whilst writing tests for the code, I found that the isNotNull/isNull predicates are being applied the wrong way around. This is covered by the tests.

I've noted that the Eclipse Link tests are now failing, I'm not sure if the technology supports the same hierarchical classes as I'm a Hibernate user. If it doesn't, is there a way to prevent the new repositories/entities being used for those tests?

Signed-off-by: James Bodkin <james.bodkin+github@amphora.net>
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Jan 13, 2026
@JBodkin-Amphora JBodkin-Amphora force-pushed the fix/keyset-hierarchical-idclass branch from 420d0e1 to 2d5e9a3 Compare January 13, 2026 18:16
Signed-off-by: James Bodkin <james.bodkin+github@amphora.net>
@JBodkin-Amphora
Copy link
Author

Eclipse Link tests are now passing after changes to the entities. Also changed the lookup to loop through the attributes instead of trying to look up by type, as Eclipse Link converts the primitive type to the wrapper type inside the metamodel

@mp911de mp911de added type: regression A regression from a previous release and removed status: waiting-for-triage An issue we've not yet triaged labels Jan 14, 2026
@mp911de
Copy link
Member

mp911de commented Jan 14, 2026

Thanks a lot. Which version of Spring Data JPA is affected for you? (So that we can correctly apply backports).

@mp911de mp911de self-assigned this Jan 14, 2026
@JBodkin-Amphora
Copy link
Author

I've noted the issue starting when I migrated to Spring Boot v4, which uses the 4.0.x branch in this project.

@mp911de mp911de added this to the 4.0.2 (2025.1.2) milestone Jan 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: regression A regression from a previous release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants