[CSHARP-2334] Does BsonIgnoreExtraElements retrieve elements through the network ? Created: 18/Jul/18  Updated: 28/Oct/23  Resolved: 02/Oct/18

Status: Closed
Project: C# Driver
Component/s: API
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Major - P3
Reporter: Yoann Couillec Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: question
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

I am trying to deserialize bson document to a C# class.

I have some heavy fields that I don't want to retrieve.

To do that I use BsonIgnoreExtraElements but I suspect this does not perform a projection and make the field traversing the network.

Can you confirm?

Thanks a lot!



 Comments   
Comment by Robert Stam [ 02/Oct/18 ]

BsonIgnoreExtraElements does not affect what is returned from the server.

So you are in fact retrieving the entire document from the server and then simply ignoring any fields that don't map to members in your C# class.

Generated at Wed Feb 07 21:42:16 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.