-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
NPE when projecting to an interface and using StringBasedAggregation #4839
Comments
If you would like us to spend some time helping you to diagnose the problem, please spend some time describing it and, ideally, providing a minimal yet complete sample that reproduces the problem. |
I already diagnosed the problem and attempted to describe what is happening step-by-step. I think the root cause is in ReturnedInterface.getTypeToRead as it returns null under certain conditions when it should return a Class that represents the interface used in the projection. |
I appreciate that you understand the issue. In such a case, care to submit a pull request? If not, then I'd like to understand the issue too and the way you understand things might be very different that other people understand them. |
…ting to an interface and using StringBasedAggregation
The best I can do at the moment is provide a failing unit-test. I attempted a fix but there are other issues preventing interface-based projections and I don't know enough about the inner workings of Spring Data Mongo. In my opinion, the root cause of this issue lies within spring-data-commons but a fix there would probably break some other implementation. |
@fdutton thanks for the testcase. |
…rface and using StringBasedAggregation
This does not happen when projecting to a class.
The text was updated successfully, but these errors were encountered: