0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-12-01 01:21:03 +01:00
mongodb/jstests/eval6.js

16 lines
193 B
JavaScript
Raw Normal View History

2009-05-10 15:24:54 +02:00
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 );