summaryrefslogtreecommitdiff
path: root/jstests/core/update8.js
blob: f59bea15e159f1f17fd23ed2513230d2211ced38 (plain)
1
2
3
4
5
6
7
8
9
10
11

t = db.update8;
t.drop();

t.update( { _id : 1 , tags: {"$ne": "a"}}, {"$push": { tags : "a" } } , true );
assert.eq( { _id : 1 , tags : [ "a" ] } , t.findOne() , "A" );

t.drop();
//SERVER-390
//t.update( { "x.y" : 1 } , { $inc : { i : 1 } } , true );
//printjson( t.findOne() );