dbref – Tools for manipulating DBRefs (references to documents stored in MongoDB)
Raises if collection or database is notan instance of basestring
( in python 3).database is optional and allows references to documents to workacross databases. Any additional keyword arguments will createadditional fields in the resultant embedded document.
Parameters:
- collection: name of the collection the document is stored in
- id: the value of the document’s field
- **kwargs (optional): additional keyword arguments willcreate additional, custom fields
The MongoDB documentation on
as_doc
()- Get the SON document representation of this DBRef.