[CSHARP-3987] He found a bug into our C# drive and he came up with the solution Created: 06/Dec/21 Updated: 27/Oct/23 Resolved: 29/Dec/21 |
|
| Status: | Closed |
| Project: | C# Driver |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Catherina Hattingh | Assignee: | Robert Stam |
| Resolution: | Gone away | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
Email from client in Brazil: @Catherina Zingg Guzman
For context, sending you scenario that we developers in Supermercados BH we work with IMongoQueryable of MongoDB.Drive.Linq and typing our code with Lambda.
The other partner that we use here are Convention and our conventions is settings of attached file ConfigurationEx.
When we doing Project/Select of register of database using Typed Class the drive working and use Anonymous Type not working. The bug occurs because a field exists in project/selct which does not exist in document. When drive analyze the expression it not found the default value of field that not exists in document. If the driver found the default value the project/select will be work.
This happen why Lambda expresstion is calling in MongoDB.Driver.Linq.Linq2Implementation.Processors. SerializerBuilder by method private BsonClassMap BuildClassMap(Type type, ProjectionMapping mapping) and here I compreend that AutoMap of BasonClassMap in MongoDB.Bson.Serialization is not calling.
In the file SerializerBuilder in line 172 it is fix bug and call of AutoMap to drive working in the present scenario .
Any questions I can do a POC. |
| Comments |
| Comment by PM Bot [ 29/Dec/21 ] |
|
There hasn't been any recent activity on this ticket, so we're resolving it. Thanks for reaching out! Please feel free to comment on this if you're able to provide more information. |
| Comment by Robert Stam [ 15/Dec/21 ] |
|
It's possible (if I am reading correctly between the lines) that this ticket is related to this other ticket: https://jira.mongodb.org/browse/CSHARP-3845
The description provided does not mention what error is being encountered, but it sounds like it might be the same issue. |
| Comment by Robert Stam [ 15/Dec/21 ] |
|
Usually a "stand alone" program means a console application reproducing the issue, but the reproduction could also be packaged as an XUnit test. The key thing is that we need an actual complete code example to look at. |
| Comment by Catherina Hattingh [ 13/Dec/21 ] |
|
Hi Robert,
Sorry I'm getting back so late – was not notified by your comment. I'm not sure what you mean by a stand alone program but I'm happy to add you to the email thread that client is reporting this from. Let me know if that would be helpful!
Thanks,
Catherina |
| Comment by Robert Stam [ 06/Dec/21 ] |
|
Thank you for reporting this issue. Can you please provide a small standalone program reproducing the issue so that we can investigate it? |
| Comment by Catherina Hattingh [ 06/Dec/21 ] |