Updated documentation for abstract reference changes

This commit is contained in:
Ashley Whetter
2015-11-10 15:03:15 +00:00
parent f96e68cd11
commit aa9d596930
3 changed files with 6 additions and 0 deletions

View File

@@ -896,6 +896,10 @@ class ReferenceField(BaseField):
or as the :class:`~pymongo.objectid.ObjectId`.id .
:param reverse_delete_rule: Determines what to do when the referring
object is deleted
.. note ::
A reference to an abstract document type is always stored as a
:class:`~pymongo.dbref.DBRef`, regardless of the value of `dbref`.
"""
if not isinstance(document_type, basestring):
if not issubclass(document_type, (Document, basestring)):