Thanks for your help Michael. ^_^
I tested all of the above code using the latest nightly on OSX. It
works for all of those cases. I extended the length of the key in the
middle like so:
db.invites.remove({})
key = {"key":"1"}
db.invites.update(key, {$set:{"a.
100001140891858100001140891858100001140891858100001140891858.c":1}},
true)
db.invites.find(key)
db.invites.update(key, {$set:{"a.
100001140891410100001140891410100001140891410100001140891410.c":999}},
true)
db.invites.find(key)
And I'm seeing what I saw on the older version:
> db.invites.remove({})
> key = {"key":"1"}
{ "key" : "1" }
> db.invites.update(key, {$set:{"a.100001140891858100001140891858100001140891858100001140891858.c":1}}, true)
> db.invites.find(key)
{ "_id" : ObjectId("4c9266db319cc0206ae656b4"), "a" :
{ "100001140891858100001140891858100001140891858100001140891858" :
{ "c" : 1 } }, "key" : "1" }
> db.invites.update(key, {$set:{"a.100001140891410100001140891410100001140891410100001140891410.c":999}}, true)
> db.invites.find(key)
{ "_id" : ObjectId("4c9266db319cc0206ae656b4"), "a" :
{ "100001140891858100001140891858100001140891858100001140891858" :
{ "c" : 999 } }, "key" : "1" }
subkey ending in 858's value is overwritten by the 410 guy.
I definitely agree that this is probably not the best schema setup
that's being used but I don't see them switching schemas anytime soon
despite the issues.