-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: 2.2.4
-
Component/s: Linq, Serialization
-
None
-
Environment:Windows 7 64bits
-
Fully Compatible
Using the mongoDb c# driver 2.2.4, selecting from a IMongoQueryable collection with a Linq Expression throws an error because of my Id field.
The exception thrown is 'Element 'Id' does not match any field or property of class MongoDbHierarchicalStoring.Man.'
You can find more info on the stackoverflow post: http://stackoverflow.com/questions/38508622/selecting-from-a-imongoqueryable-collection-with-a-linq-expression-throws-an-err
If I change my 'Id' property and rename it '_id', it worked. But in a prior version of the driver (2.1.1) it used to work fine.
The sample you can find in the attached file proves it : testing with the old version of the driver retrieves the data where as the new version throws an exception.
- related to
-
CSHARP-1555 Projecting from and to the same type including the _id field causes deserialization to fail
- Closed