Fix duplicate field name serialization with @BsonDiscriminator and getter#1610
Fix duplicate field name serialization with @BsonDiscriminator and getter#1610rozza merged 9 commits intomongodb:mainfrom
Conversation
|
@raffaeleflorio could you include a test case for the issue? |
|
@rozza I've just added the test case. The |
|
@rozza I also added the |
89f904e to
0e7dfd4
Compare
67731e5 to
0b34a9b
Compare
2c7d0d1 to
01c4820
Compare
ba54a86 to
443d36c
Compare
b7b2ec1 to
e8446d6
Compare
a6de0b5 to
3ae1b70
Compare
…ith the roundTrip one
|
Assigned |
bson/src/test/unit/org/bson/codecs/pojo/entities/DiscriminatorWithGetterModel.java
Outdated
Show resolved
Hide resolved
bson/src/test/unit/org/bson/codecs/pojo/entities/DiscriminatorWithProperty.java
Outdated
Show resolved
Hide resolved
|
Looks good - just going to run the CI again then should be able to merge. Thanks @raffaeleflorio |
rozza
left a comment
There was a problem hiding this comment.
LGTM! Thank you @raffaeleflorio for the excellent PR.
I'm pleased to say this improvement will be part of the 5.6 release.
Fixes NPE due to BSONIgnore fields introduced in #1610 JAVA-5971 --------- Co-authored-by: Ross Lawley <[email protected]>
Fixes NPE due to BSONIgnore fields introduced in mongodb#1610 JAVA-5971 --------- Co-authored-by: Ross Lawley <[email protected]>
This PR is about the JAVA-5764 issue. It changes the
encodemethod by skipping the encode of a property if it's already encoded as the discriminator.