[CSHARP-378] In the update methode, don't call the serializer when creating the query Created: 06/Jan/12  Updated: 02/Apr/15  Resolved: 19/Feb/12

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

Type: Bug Priority: Major - P3
Reporter: Sebastien Balant Assignee: Robert Stam
Resolution: Done Votes: 0
Labels: collection, update
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Windows7



 Description   

I have a class with a property "Id" that is mapped with a custom serializer.
When I try to update an element, using the Save method of the MongoCollection class, the query is built without using the serializer to map the property with the correct type.
I don't use the BSonRepresentationAttribute on my property.



 Comments   
Comment by Robert Stam [ 01/Feb/12 ]

Thanks. Just wanted to make sure I was looking at the right thing.

Comment by Sebastien Balant [ 31/Jan/12 ]

Yes, I mapped using the SetSerializer method:

base.MapIdField(d => d.Id).SetSerializer(MyCustomSerializer).SetIdGeneration(MyCustomGenerator);

Comment by Robert Stam [ 31/Jan/12 ]

When you say it is mapped with a custom serializer do you mean that you called BsonMemberMap.SetSerializer?

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