Jonathan Prates
ee0c7fd8bf
Change for loop to self.first()
2014-05-28 13:21:00 -03:00
Jonathan Prates
dfdecef8e7
Fix py2 and py3
2014-05-28 09:40:22 -03:00
Jonathan Prates
edcdfeb057
Fix syntax error
2014-05-28 09:03:12 -03:00
Jonathan Prates
47f0de9836
Py3 fix
2014-05-28 08:36:57 -03:00
Jonathan Prates
3faf3c84be
Avoid to open all documents from cursors in an if stmt
...
Using a cursos in an if statement:
cursor = Collection.objects
if cursor:
(...)
Will open all documents, because there are not an __nonzero__ method.
This change check only one document (if present) and returns True or False.
2014-05-27 16:33:38 -03:00
Dmitry Konishchev
803caddbd4
Raise NotUniqueError in Document.update() on pymongo.errors.DuplicateKeyError
2014-04-09 14:25:53 +04:00
poly
4d7b988018
Fixed uncorrectly split a query key, when it ends with "_"
2014-04-01 19:52:21 +08:00
Wilson Júnior
295ef3dc1d
db_alias support and fixes for custom map/reduce output
2014-02-25 15:36:30 -03:00
Aleksandr Sorokoumov
328e062ae9
Distinct method bugfix
...
Creation of instances is executed now only for EmbeddedDocumentField
and GenericEmbeddedDocumentField in distinct method
2014-02-24 19:21:11 +04:00
Ross Lawley
0e5a0661e1
Fixed possible issue not catching duplicate key errors
2014-01-24 13:50:09 +00:00
Ross Lawley
7200a8cb84
Merge pull request #498 from woakas/patch-1
...
Fixed bug for count method when _none is True
2013-11-29 04:01:45 -08:00
Ross Lawley
6db59a9c31
Fix setting Geo Location fields ( #488 )
2013-11-29 11:41:54 +00:00
Ross Lawley
c28d9135d9
Fixed distinct casting issue with ListField of EmbeddedDocuments ( #470 )
2013-11-29 09:48:53 +00:00
Gustavo Andrés Angulo
27b846717f
Fixed bug for count method when _none is True
...
If my queryset have elements example:
qs.all().count() => 10
q = qs.all().none()
the count in queryset "q" must be 0
q.count() => 0
2013-10-17 16:37:31 -05:00
swistakm
66d9182e50
fix broken external docs link
2013-09-20 12:43:26 +02:00
Ross Lawley
fffd0e8990
Fixed error raise
2013-08-20 18:54:14 +00:00
Ross Lawley
0dd01bda01
Fixed "$pull" semantics for nested ListFields ( #447 )
2013-08-20 15:54:42 +00:00
Ross Lawley
8a3171308a
Merge remote-tracking branch 'origin/pr/445'
2013-08-20 13:04:20 +00:00
Ross Lawley
29c887f30b
Updated field filter logic - can now exclude subclass fields ( #443 )
2013-08-20 12:21:20 +00:00
Ross Lawley
67baf465f4
Fixed slice when using inheritance causing fields to be excluded ( #437 )
2013-08-20 09:14:58 +00:00
crazyzubr
70b320633f
permit the establishment of a field with the name of size or other
...
Example:
# model
class Example(Document):
size = ReferenceField(Size, verbose_name='Size')
# query
examples = Example.objects(size=instance_size)
# caused an error
"""
File ".../mongoengine/queryset/transform.py", line 50, in query
if parts[-1] == 'not':
IndexError: list index out of range
"""
2013-08-15 19:32:13 +08:00
Ross Lawley
5e70e1bcb2
Update transform to handle docs erroneously passed to unset ( #416 )
2013-07-30 13:17:38 +00:00
Ross Lawley
6efd6faa3f
Fixed QuerySetNoCache.count() caching ( #410 )
2013-07-30 10:30:16 +00:00
Ross Lawley
67f43b2aad
Allow args and kwargs to be passed through to_json ( #420 )
2013-07-29 15:29:48 +00:00
Ross Lawley
d92ed04538
Docs update #406
2013-07-23 08:13:52 +00:00
Ross Lawley
6e89e736b7
Merge remote-tracking branch 'origin/pr/393' into 393
...
Conflicts:
mongoengine/queryset/queryset.py
tests/queryset/queryset.py
2013-07-10 19:53:13 +00:00
Ross Lawley
634b874c46
Added QuerySetNoCache and QuerySet.no_cache() for lower memory consumption ( #365 )
2013-07-10 19:40:57 +00:00
Ross Lawley
f4ea1ad517
Merge remote-tracking branch 'origin/pr/376'
...
Conflicts:
AUTHORS
2013-07-10 13:50:52 +00:00
Ross Lawley
f34e8a0ff6
Fixed as_pymongo to return the id ( #386 )
2013-07-10 13:38:53 +00:00
Wilson Júnior
592c654916
extending support for queryset.sum and queryset.average methods
2013-07-05 10:36:11 -03:00
kelvinhammond
caff44c663
Fixed sum and average queryset function
...
* Fixed sum and average map reduce functions for sum and average so that
it works with mongo dot notation.
* Added unittest cases / updated them for the new changes
2013-06-21 09:39:11 -04:00
Ross Lawley
d6edef98c6
Added match ($elemMatch) support for EmbeddedDocuments ( #379 )
2013-06-21 11:29:23 +00:00
kelvinhammond
e0d2fab3c3
Merge branch 'master' of https://github.com/MongoEngine/mongoengine
...
Conflicts:
AUTHORS
2013-06-21 07:26:40 -04:00
Ross Lawley
e116bb9227
Fixed queryset.get() respecting no_dereference ( #373 )
2013-06-21 10:39:10 +00:00
Ross Lawley
f1a1aa54d8
Added full_result kwarg to update ( #380 )
2013-06-21 10:19:40 +00:00
Ross Lawley
574f3c23d3
get should clone before calling
2013-06-21 09:35:22 +00:00
kelvinhammond
c31d6a6898
Fixed sum and average mapreduce function for issue #375
2013-06-19 10:34:33 -04:00
Ross Lawley
ad15781d8f
Fixed amibiguity and differing behaviour regarding field defaults ( #349 )
...
Now field defaults are king, unsetting or setting to None on a field
with a default means the default is reapplied.
2013-06-06 13:31:52 +00:00
Ross Lawley
940dfff625
Code cleanup
2013-06-05 09:49:26 +00:00
Stefan Wojcik
eba81e368b
dont use $in for _cls queries with a single subclass
2013-06-04 15:32:23 -07:00
Ross Lawley
eeb5a83e98
Added lock when calling doc.Delete() for when signals have no sender ( #350 )
2013-06-04 16:35:25 +00:00
Ross Lawley
ee725354db
Querysets are now lest restrictive when querying duplicate fields ( #332 , #333 )
2013-06-04 10:46:38 +00:00
Ross Lawley
985bfd22de
Merge remote-tracking branch 'origin/pr/333' into 333
2013-06-04 10:22:54 +00:00
Ross Lawley
4c8dfc3fc2
Fixed Doc.objects(read_preference=X) not setting read preference ( #352 )
2013-06-03 15:40:54 +00:00
Stefan Wojcik
774895ec8c
dont simplify queries with duplicate conditions
2013-05-23 17:49:28 -07:00
Ross Lawley
c96a1b00cf
Documentation cleanup ( #328 )
2013-05-23 19:09:05 +00:00
Ross Lawley
5b498bd8d6
Added no_sub_classes context manager and queryset helper ( #312 )
2013-05-10 15:05:16 +00:00
Ross Lawley
941042d0ba
Merge remote-tracking branch 'origin/pr/312' into 312
2013-05-10 14:44:44 +00:00
Ross Lawley
9251ce312b
Querysets now utilises a local cache
...
Changed __len__ behavour in the queryset (#247 , #311 )
2013-05-10 13:57:32 +00:00
Wilson Júnior
96a964a183
added .disable_inheritance method for the simple fetch exclusives classes
2013-05-09 13:18:58 -03:00