Details
-
Bug
-
Resolution: Done
-
Major - P3
-
None
-
None
-
None
-
None
Description
Moved from: http://github.com/mongodb/mongo-csharp-driver/issues#issue/5
Hi,
I think this is not the correct result. Please see the following code:
public class BaseModel
{ [BsonId] public ObjectId Id
public class User : BaseModel
{ public ObjectId FriendId { get; set; }
}
[TestFixture] public class Test
{ [Test] public void New()
}
The result in mongodb is:
db.user.find()
{ "FriendId" : ObjectId("xxxxxxxxxxxxxxxxxxxxxxx"), "_id" : ObjectId("0000000000000000000") }[I modified above code from my real code so the result might not be the same order but the point is in my result, new object id is assigned to wrong property]