spring-batch
spring-batch copied to clipboard
Extend fetchSize support across JPA Item Readers
Resolves #4479
@baezzys Please sign the Contributor License Agreement!
Click here to manually synchronize the status of this Pull Request.
See the FAQ for frequently asked questions.
@baezzys Thank you for signing the Contributor License Agreement!
@baezzys Thank you for the PR! I added an inline comment on how we should address this feature request. Could please take a look? If you agree, please update the PR and it should be good to merge. Thank you upfront.
@fmbenhassine Thanks for checking out my PR. But I can't seem to find the inline comment you're talking about. Can you point me in the right direction?
The JPA reader should not depend on APIs from a specific implementation (ie import org.hibernate.jpa.AvailableHints;), it should be implementation agnostic. The way the requested feature should be implemented is by adding a Map<String, Object> hintValues for hints (similar to Map<String, Object> parameterValues for query parameters) and set those hints on the query with query#setHint in doOpen. The user can then specify all the hints supported by the provider and pass them as a Map to the JPA reader.
@fmbenhassine Thank you for your review and feedback! I'll update the PR to use Map<String, Object> hintValues for setting hints, ensuring the JPA reader remains implementation-agnostic.
@fmbenhassine I've updated the PR to include a Map<String, Object> hintValues for hints, similar to our approach with query parameters. This change ensures our JPA reader is implementation-agnostic, allowing users to specify provider-supported hints directly.
I hope this update aligns with your guidance. Please let me know if there are any further adjustments needed.
Thank you for the update, LGTM now 👍 Rebased and merged as 5a261fa7c6945de9c3dc85145473c0fa3ac4321b. Thank you for your contribution!
Nice work @baezzys !