Finishing touches to where implementation - thanks to dcrosta
Refs #242
This commit is contained in:
@@ -620,7 +620,7 @@ class GenericReferenceField(BaseField):
|
||||
"""A reference to *any* :class:`~mongoengine.document.Document` subclass
|
||||
that will be automatically dereferenced on access (lazily).
|
||||
|
||||
note: Any documents used as a generic reference must be registered in the
|
||||
..note :: Any documents used as a generic reference must be registered in the
|
||||
document registry. Importing the model will automatically register it.
|
||||
|
||||
.. versionadded:: 0.3
|
||||
@@ -925,7 +925,7 @@ class SequenceField(IntField):
|
||||
return value
|
||||
|
||||
def __set__(self, instance, value):
|
||||
|
||||
|
||||
if value is None and instance._initialised:
|
||||
value = self.generate_new_value()
|
||||
|
||||
|
||||
@@ -1401,6 +1401,10 @@ class QuerySet(object):
|
||||
"""Filter ``QuerySet`` results with a ``$where`` clause (a Javascript
|
||||
expression). Performs automatic field name substitution like
|
||||
:meth:`mongoengine.queryset.Queryset.exec_js`.
|
||||
|
||||
.. note:: When using this mode of query, the database will call your
|
||||
function, or evaluate your predicate clause, for each object
|
||||
in the collection.
|
||||
"""
|
||||
where_clause = self._sub_js_fields(where_clause)
|
||||
self._where_clause = where_clause
|
||||
|
||||
Reference in New Issue
Block a user