Tools for manipulating DBRefs (references to MongoDB documents).
Initialize a new DBRef.
Raises TypeError if collection or database is not an instance of basestring (str in python 3). database is optional and allows references to documents to work across databases. Any additional keyword arguments will create additional fields in the resultant embedded document.
Parameters : |
|
---|
Changed in version 1.8: Now takes keyword arguments to specify additional fields.
New in version 1.1.1: The database parameter.
See general MongoDB documentation
Get the SON document representation of this DBRef.
Generally not needed by application developers
Get the name of this DBRef’s collection as unicode.
Get the name of this DBRef’s database.
Returns None if this DBRef doesn’t specify a database.
New in version 1.1.1.
Get this DBRef’s _id.