Documentation update for document errors (MongoEngine/mongoengine#124)
This commit is contained in:
parent
28ef54986d
commit
aa5a9ff1f4
@ -4,6 +4,7 @@ Changelog
|
||||
|
||||
Changes in 0.8
|
||||
==============
|
||||
- Documentation update for document errors (MongoEngine/mongoengine#124)
|
||||
- Deprecated `get_or_create` (MongoEngine/mongoengine#35)
|
||||
- Updated inheritable objects created by upsert now contain _cls (MongoEngine/mongoengine#118)
|
||||
- Added support for creating documents with embedded documents in a single operation (MongoEngine/mongoengine#6)
|
||||
|
@ -179,9 +179,11 @@ Retrieving unique results
|
||||
-------------------------
|
||||
To retrieve a result that should be unique in the collection, use
|
||||
:meth:`~mongoengine.queryset.QuerySet.get`. This will raise
|
||||
:class:`~mongoengine.queryset.DoesNotExist` if no document matches the query,
|
||||
and :class:`~mongoengine.queryset.MultipleObjectsReturned` if more than one
|
||||
document matched the query.
|
||||
:class:`~mongoengine.queryset.DoesNotExist` if
|
||||
no document matches the query, and
|
||||
:class:`~mongoengine.queryset.MultipleObjectsReturned`
|
||||
if more than one document matched the query. These exceptions are merged into
|
||||
your document defintions eg: `MyDoc.DoesNotExist`
|
||||
|
||||
A variation of this method exists,
|
||||
:meth:`~mongoengine.queryset.Queryset.get_or_create`, that will create a new
|
||||
|
Loading…
x
Reference in New Issue
Block a user