summaryrefslogtreecommitdiff
path: root/jstests/core/eval6.js
blob: 5fe096974c6dbebf11b1323f2a3c8a0ae02bd882 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15

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

t.save( { a : 1 } );

db.eval( 
    function(){
        o = db.eval6.findOne();
        o.b = 2;
        db.eval6.save( o );
    }
);

assert.eq( 2 , t.findOne().b );