[JAVA-3962] Support missing bson field in documents Created: 26/Jan/21 Updated: 08/Feb/21 Resolved: 08/Feb/21 |
|
| Status: | Closed |
| Project: | Java Driver |
| Component/s: | Scala |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | New Feature | Priority: | Major - P3 |
| Reporter: | Gaël Ferrachat | Assignee: | Ross Lawley |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Documentation Changes Summary: | Something like: If an bson array field is missing from the document, it will be populated as an empty collection at runtime. |
||||||||
| Description |
|
Goal: Be able to deserialize documents where
to ease changes in models without having to run scripts or write custom codecs.
Now, this won't work,
|
| Comments |
| Comment by Gaël Ferrachat [ 05/Feb/21 ] |
|
Hi Ross, Yes clearly. I can track 3551. Thank you |
| Comment by Ross Lawley [ 05/Feb/21 ] |
|
Hi gael.ferrachat@newsbridge.io, I think being able to use default arguments would be the way to make this work see: JAVA-3551. Would you agree? Ross |
| Comment by Esha Bhargava [ 01/Feb/21 ] |
|
gael.ferrachat@newsbridge.io Thank you for reporting this issue! We'll investigate this and get back to you. |
| Comment by Gaël Ferrachat [ 26/Jan/21 ] |
|
Something close to how `Option`s are handled in fact. |