-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: JavaScript
-
None
-
Fully Compatible
-
ALL
Caused by fix for SERVER-9066 so this isn't in any released version: https://github.com/mongodb/mongo/commit/d2febea6d4a66998682467aa0e4adc0d55365166
> db.z.drop() true > db.z.insert({}) > obj = db.z.findOne() { "_id" : ObjectId("515e01d9136e8af76db54678") } > obj.c = 1; obj { "_id" : ObjectId("515e01d9136e8af76db54678"), "c" : 1 } > obj.b = 1; obj { "_id" : ObjectId("515e01d9136e8af76db54678"), "b" : 1, "c" : 1 } > obj.a = 1; obj { "_id" : ObjectId("515e01d9136e8af76db54678"), "a" : 1, "b" : 1, "c" : 1 }
The last 3 fields should be in in the opposite order, that is in insertion order.