-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Repository query projection not working as expected since 3.4.x #4524
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
Comments
Thanks for reporting and the reproducer. We'll have a look. |
Thanks for fixing this so quick! Is this going out on October 13th? |
@jcedenopyx with the next release, yes. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When using a
MongoRepository<A, B>
, query functions that project from type A to type C (with compatible fields), spring attempts to convert the full object to the Id field type.This behavior worked fine until spring data 3.3.x. Using
@Id
or@MongoId
on the Id field has no effect, but using@Field("_id")
makes it so that it maps properly.Demo reproducing the bug: https://github.com/jcedenopyx/spring-data-mongo-query-projection-issue/blob/master/src/test/java/me/jcedeno/demo/DemoApplicationTests.java#L89-L95
The text was updated successfully, but these errors were encountered: