p3t / spring-cursorpaging

The spring-cursorpaging provides an repository fragment interface which can be used to scroll efficiently over large result-sets.
Apache License 2.0
3 stars 1 forks source link

Fixing an issue where pages did not contain the expected content #31

Closed p3t closed 3 months ago

p3t commented 3 months ago

When using multiple and not-unique attributes as cursor properties, the query was build up with only "and" statements, resulting in incorrect page content (dummy code for selecting a certain page):

select * from datarecord 
 where name > 'Echo' and id > '1234-5678-90123'

Query is now build with an hierarchical strategy:

select * from datarecord
 where name > 'Echo'
       or (name = 'Echo' and id > '1234-5678-90123')