[JAVA-2218] Handle mismatches between document fields and object fields Created: 10/Jun/16  Updated: 29/Aug/19  Resolved: 03/Apr/17

Status: Closed
Project: Java Driver
Component/s: Codecs
Affects Version/s: None
Fix Version/s: 3.5.0

Type: New Feature Priority: Major - P3
Reporter: Justin Lee Assignee: Ross Lawley
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to JAVA-3416 Add Query Deserialization Validation ... Backlog
Epic Link: POJO

 Description   

What do we do when we find fields in the documents that aren't found in the Java objects we're deserializing in to? Options include:

  1. Skipping that document field
  2. Throwing an exception
  3. Dumping extra fields in to an optional BsonDocument on the object to hold these extra fields.


 Comments   
Comment by Ross Lawley [ 03/Apr/17 ]

See JAVA-1812 for the commit containing the commit covering this ticket.

Comment by Ross Lawley [ 02/Feb/17 ]

Apart of https://mongodbcr.appspot.com/114600001/

We currently skip the field and log a message to the user.

Generated at Thu Feb 08 08:56:38 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.