Details
-
Bug
-
Resolution: Done
-
Major - P3
-
None
-
None
-
None
Description
Given a class of type Person
class Person
|
{
|
[BsonRepresentation(BsonType.ObjectId)]
|
public string Id {get; set;}
|
}
|
The aggregation framework expression trees are currently losing the ObjectId representation.
.Project(x => new { MyId = x.Id })
|
.Match(x => x.MyId == "54b73ce5e9080a3534370443")
|
The Match should render the "54b73..." as an objectId in the query, but instead it renders it as a string because we lost the serialization information when we did a projection.