0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-12-01 01:21:03 +01:00
mongodb/jstests/eval6.js
2009-05-10 09:24:54 -04:00

16 lines
193 B
JavaScript

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 );