Closed roharon closed 3 months ago
Failed on testMigrationToNewQueryDSL
on CI.
But I guess fetchBatchedResults
sql query don't need to preserve query as old query dsl.
Because (Cities.cityId > 0)
query seems like is not necessary.
SELECT Cities.`name` FROM Cities WHERE (Cities.`name` = 'andrey') AND (Cities.cityId > 0) ORDER BY Cities.cityId ASC LIMIT 50
Iterable elements differ at index 6. Expected element <SELECT Cities.`name` FROM Cities WHERE (Cities.`name` = 'andrey') AND (Cities.cityId > 0) ORDER BY Cities.cityId ASC LIMIT 50>, actual element <SELECT Cities.`name` FROM Cities WHERE Cities.`name` = 'andrey' ORDER BY Cities.cityId ASC LIMIT 50>.
java.lang.AssertionError: Iterable elements differ at index 6. Expected element <SELECT Cities.`name` FROM Cities WHERE (Cities.`name` = 'andrey') AND (Cities.cityId > 0) ORDER BY Cities.cityId ASC LIMIT 50>, actual element <SELECT Cities.`name` FROM Cities WHERE Cities.`name` = 'andrey' ORDER BY Cities.cityId ASC LIMIT 50>.
This PR includes
fetchBatchedResults
method which supports thesortOrder
parameter.Previously,
fetchBatchedResults
method only supported thebatchSize
parameter, making it impossible to handle sorting order as it defaulted to ascending. Adding support for thesortOrder
parameter will be helpful.