[SERVER-9251] "Extra" fields added to lazy BSON V8 objects not order preserving Created: 04/Apr/13  Updated: 11/Jul/16  Resolved: 11/Apr/13

Status: Closed
Project: Core Server
Component/s: JavaScript
Affects Version/s: None
Fix Version/s: 2.4.2, 2.5.0

Type: Bug Priority: Major - P3
Reporter: Mathias Stearn Assignee: Mathias Stearn
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Operating System: ALL
Participants:

 Description   

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.



 Comments   
Comment by auto [ 06/Apr/13 ]

Author:

{u'date': u'2013-04-05T20:19:25Z', u'name': u'Mathias Stearn', u'email': u'mathias@10gen.com'}

Message: SERVER-9267 Make readonly v8 objects use same getters as regular lazy objects

Also fixes SERVER-9251
Branch: v2.4
https://github.com/mongodb/mongo/commit/1a6239025624c7660b65970d3258f1a242ab4512

Comment by auto [ 05/Apr/13 ]

Author:

{u'date': u'2013-04-05T20:19:25Z', u'name': u'Mathias Stearn', u'email': u'mathias@10gen.com'}

Message: SERVER-9267 Make readonly v8 objects use same getters as regular lazy objects

Also fixes SERVER-9251
Branch: master
https://github.com/mongodb/mongo/commit/be6a5bbdca5b7b0566d043b6d7cea289743812d1

Generated at Thu Feb 08 03:19:49 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.