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

11 lines
203 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");