mirror of
https://github.com/mongodb/mongo.git
synced 2024-12-01 01:21:03 +01:00
16 lines
193 B
JavaScript
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 );
|