-
Notifications
You must be signed in to change notification settings - Fork 0
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
Allow Subclasses in the CompositeItemReader #2
Comments
Thank you for reporting this! That makes sense to me. The composite reader was merged in the main repository and will be part of the upcoming v5.2, so you are welcome to contribute a PR and I will include it in v5.2. Please close this issue once you open a PR on the other side. Many thanks upfront! |
I created spring-projects/spring-batch#4682 |
fmbenhassine
pushed a commit
to spring-projects/spring-batch
that referenced
this issue
Oct 23, 2024
FBibonne
pushed a commit
to FBibonne/spring-batch
that referenced
this issue
Feb 2, 2025
Resolves #spring-projects-experimental/spring-batch-experimental#2 Signed-off-by: Fabrice Bibonne <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I am currently trying out the CompositeItemReader. In my use case the two Delegates are RepositoryItemReader created via the Builder .
Now my two RepositoryItemReader do not return the exact same class but one that have a shared parent in their hierarchy.
E.g.:
This results in me having a
RepositoryItemReader<Duck>
andRepositoryItemReader<Dog>
. Unfortunately the current implementation doesn't allow such a constellation. Both need to be (unsavely) cast to aRepositoryItemReader<Animal>
So my proposition ist to make the CompositeItemReader less restrictive and allow the delegates to read the same subclass while still having the same return value from the read-method:
p.s. I would gladly create a fitting PR if this suggestion get's approved!
The text was updated successfully, but these errors were encountered: