public class DBRef extends DBRefBase
While instances of this class are Serializable
, deserialized instances can not be fetched,
as the db
property is transient.
Constructor and Description |
---|
DBRef(DB db,
BSONObject o)
Creates a DBRef
|
DBRef(DB db,
String ns,
Object id)
Creates a DBRef
|
public DBRef(DB db, BSONObject o)
db
- the databaseo
- a BSON object representing the referencepublic static DBObject fetch(DB db, DBObject ref)
db
- the databaseref
- the referenceMongoException