0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-12-01 01:21:03 +01:00
mongodb/jstests/dbref1.js
2009-10-02 16:38:20 -04:00

11 lines
222 B
JavaScript

a = db.dbref1a;
b = db.dbref1b;
a.drop();
b.drop();
a.save( { name : "eliot" } );
b.save( { num : 1 , link : new DBPointer( "dbref1a" , a.findOne()._id ) } );
assert.eq( "eliot" , b.findOne().link.fetch().name , "A" );