[JAVA-4580] Use BsonExtraElements annotation in ChangeStreamDocument Created: 18/Apr/22  Updated: 28/Oct/23  Resolved: 23/May/22

Status: Closed
Project: Java Driver
Component/s: Change Streams
Affects Version/s: None
Fix Version/s: 4.7.0

Type: New Feature Priority: Minor - P4
Reporter: Jeffrey Yemin Assignee: Jeffrey Yemin
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Documented
Backwards Compatibility: Fully Compatible
Documentation Changes: Needed

 Description   

We should use the BsonExtraElements annotation on a new property added to ChangeStreamDocument, so that ChangeStreamDocument can represent new fields aded by the server even with older drivers.

Once we do that the unified test "The test "Test projection in change stream returns expected fields" could be implemented using ChangeStreamDocument rather than BsonDocument.



 Comments   
Comment by Githook User [ 23/May/22 ]

Author:

{'name': 'Jeff Yemin', 'email': 'jeff.yemin@mongodb.com', 'username': 'jyemin'}

Message: Support extra elements in ChangeStreamDocument (#949)

JAVA-4580
Branch: master
https://github.com/mongodb/mongo-java-driver/commit/5a6b2063f5e99a4e8f635de16b9eb9409df23926

Generated at Thu Feb 08 09:02:27 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.