mirror of
https://github.com/mongodb/mongo.git
synced 2024-12-01 09:32:32 +01:00
12 lines
331 B
JavaScript
12 lines
331 B
JavaScript
|
|
t = db.set3;
|
|
t.drop();
|
|
|
|
t.insert( { "test1" : { "test2" : { "abcdefghijklmnopqrstu" : {"id":1} } } } );
|
|
t.update( {}, {"$set":{"test1.test2.abcdefghijklmnopqrstuvwxyz":{"id":2}}})
|
|
|
|
x = t.findOne();
|
|
assert.eq( 1 , x.test1.test2.abcdefghijklmnopqrstu.id , "A" );
|
|
assert.eq( 2 , x.test1.test2.abcdefghijklmnopqrstuvwxyz.id , "B" );
|
|
|