-
Notifications
You must be signed in to change notification settings - Fork 312
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
@BatchMapping methods should pass the localContext as the BatchLoaderEnvironment's keyContexts #1066
Comments
Thanks for reaching out @ooraini . I'm not sure I understand the problem here. Rather than pointing to a possible fix, could you explain what you're doing and where you're getting the Here, this part of our codebase is about registering |
Apologies, I meant to refer to the
I'm using two values from the local context. Things work. Now, I want to optimize it by processing fields in batch using
But, the
I expect(hope?) Hope that helps. |
Thanks for the additional info @ooraini that made perfect sense. This should be fixed in SNAPSHOTs shortly. We have scheduled a set of maintenance versions on Tuesday. |
I've changed this to an enhancement as the current behavior was intentional, see #232 (comment) for previous discussions. |
calling
getKeyContexts
onBatchLoaderEnvironment
returns a list of nulls. I think this is caused by Spring'sBatchMappingDataFetcher
not propagating the local context. Specifically line 606:Changing it to:
return dataLoader.load(env.getSource(), env.getLocalContext())
might fix the issue.(I think)The text was updated successfully, but these errors were encountered: