summaryrefslogtreecommitdiff
path: root/jstests/find_and_modify_server6993.js
blob: b8a319153728fa9b838e5c4670a53d7fe6ac0c86 (plain)
1
2
3
4
5
6
7
8
9

c = db.find_and_modify_server6993;
c.drop();
 
c.insert( { a:[ 1, 2 ] } );
 
c.findAndModify( { query:{ a:1 }, update:{ $set:{ 'a.$':5 } } } );
 
assert.eq( 5, c.findOne().a[ 0 ] );