[CSHARP-4757] Modify BsonSerializationInfo to handle properties that are grouped in a nested document Created: 17/Aug/23 Updated: 14/Sep/23 Resolved: 14/Sep/23 |
|
| Status: | Closed |
| Project: | C# Driver |
| Component/s: | LINQ3 |
| Affects Version/s: | 2.21.0 |
| Fix Version/s: | 2.22.0 |
| Type: | Improvement | Priority: | Unknown |
| Reporter: | Robert Stam | Assignee: | Robert Stam |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||
| Documentation Changes: | Not Needed | ||||||||||||||||||||
| Documentation Changes Summary: | 1. What would you like to communicate to the user about this feature? |
||||||||||||||||||||
| Description |
|
In some cases it can be advantageous to group several properties under a nested document in the serialized form. For example, the class:
might need to be serialized as:
While this serialization format could also be achieved by declaring a custom POCO to hold the OrderId/ProductId pair, there are cases where we might want the components of a compound primary key to appear at the top level in the POCO while being grouped together in a nested `_id` element in the serialized form. |
| Comments |
| Comment by Githook User [ 14/Sep/23 ] |
|
Author: {'name': 'rstam', 'email': 'robert@robertstam.org', 'username': 'rstam'}Message: |