craiggwilson / fluent-mongo

Provides a fluent interface on top of the 10gen driver including Linq.
172 stars 28 forks source link

Add support for de-selecting _id field with Select() #24

Closed nekresh closed 13 years ago

nekresh commented 13 years ago

When using a projection that doesn't select the Id field and the destination class doesn't contains an Id field, fluent-mongo will fail to deserialize it. When selecting fields in mongodb, _id is always included in the results unless you specifically unselect it with { '_id' : 0 }.