Commit Graph
1182 Commits
Author SHA1 Message Date
mrigal 531fa30b69 added test for capacity to get distinct on subdocument of a list 2014-12-01 18:20:29 +01:00
Wilson Júnior 2b3bb81fae Refactoring: Simple is better than complex
Signed-off-by: Wilson Júnior <wilsonpjunior@gmail.com>
2014-11-29 23:48:58 -02:00
RikandWilson Júnior 80f80cd31f fixed more tests that were using undefined model fields 2014-11-29 23:20:31 -02:00
RikandWilson Júnior 1cac35be03 using python 2.6 compatible way of assertRaises 2014-11-29 23:20:30 -02:00
RikandWilson Júnior 6d48100f44 add test if FieldDoesNotExist is raised
When trying to set an undefined field.
2014-11-29 23:20:30 -02:00
RikandWilson Júnior 913952ffe1 remove unittest test_no_overwritting_no_data_loss
Now that fields need to be defined explicitly, it's not possible to have
another property with the same name on a model.
https://github.com/MongoEngine/mongoengine/pull/457#issuecomment-47513105
2014-11-29 23:20:30 -02:00
RikandWilson Júnior 67bf6afc89 fixed tests that were using undefined model fields 2014-11-29 23:20:30 -02:00
Wilson Júnior 74a89223c0 replaced text_score attribute to get_text_score method
Signed-off-by: Wilson Júnior <wilsonpjunior@gmail.com>
2014-11-29 23:09:26 -02:00
Matthew Ellison 43af9f3fad Update Tests for EmbeddedDocument Unique Indicies 2014-11-20 11:20:04 -05:00
Matthew EllisonandMatthew Ellison bc53dd6830 Generate Unique Indices for Lists of EmbeddedDocs
- Unique indices are now created in the database for EmbeddedDocument
  fields when the EmbeddedDocument is in a ListField
- Closes Issue #358
2014-11-19 22:37:27 -05:00
David Bordeynik 8965172603 fix-#515: sparse fields 2014-11-14 21:45:46 +02:00
Yohan Graterol a12b2de74a Fix merge MongoEngine/mongoengine#799 2014-11-09 21:31:56 -05:00
Yohan Graterol 5583cf0a5f PEP8 compliance tests/document/instance.py 2014-11-09 21:27:23 -05:00
Yohan Graterol 57d772fa23 Fix merge in tests/document/instance.py 2014-11-09 21:19:05 -05:00
André Ericson 2af55baa9a Better BaseDocument equality check when not saved
When 2 instances of a Document had id = None they would be considered
equal unless an __eq__ were implemented.

We now return False for such case. It now behaves more similar to
Django's ORM.
2014-11-09 16:19:15 -03:00
David Bordeynik 0452eec11d fix-#771: OperationError: Shard Keys are immutable. Tried to update id even though the document is not yet saved 2014-11-09 19:23:49 +02:00
André Ericson 3569529a84 Fix KeyError on reload() from a DynamicDocument
If the document is in memory and a field is deleted from the db,
calling reload() would raise a KeyError.
2014-11-08 19:11:51 -03:00
Yohan Graterol 73d6bc35ec Fix merge with AUTHORS 2014-11-07 11:02:48 -05:00
DavidBord bdbd495a9e fix-#734: set attribute to None does not work (at least for fields with default values). Solves #735 as well 2014-11-07 15:11:21 +02:00
DavidBord 914c5752a5 fix-#759: with_limit_and_skip for count should default like in pymongo 2014-11-07 09:21:17 +02:00
DavidBord c5f23ad93d fix-#744: Querying by a field defined in a subclass raises InvalidQueryError 2014-11-06 00:15:23 +02:00
Dmitry Konishchev bc9aff8c60 Merge remote-tracking branch 'upstream/master' into pr-document-modify 2014-11-02 17:24:51 +03:00
David Czarnecki 4b498ae8cd Fix the documentation for reverse_delete_rule. 2014-10-31 11:40:20 -04:00
DavidBord b011d48d82 fix-#778: Add Support For MongoDB 2.6.X's maxTimeMS 2014-10-29 15:40:29 +02:00
DavidBord 9a4aef0358 fix-#789: abstract shouldn't be inherited in EmbeddedDocument 2014-10-29 13:36:42 +02:00
Dmitry Konishchev 5d2ca6493d Drop unnecessary id=ObjectId() in document creation 2014-10-01 12:38:41 +04:00
Dmitry Konishchev 4752f9aa37 Add Document.modify() method 2014-09-30 15:30:01 +04:00
Vjacheslav Murashkin 7430b31697 handle None from model __str__; Fixes #753 2014-09-04 16:54:23 +04:00
Bob Cribbs d9da75d1c0 Fix multiple connections aliases being rewritten 2014-09-01 23:26:01 +03:00
Axel Haustant 6f645e8619 Added MultiPoint, MultiLine and MultiPolygon fields 2014-08-28 19:36:29 +02:00
DavidBord 9b30afeca9 fix-#397: Allow specifying the '_cls' as a field for indexes 2014-08-24 10:51:49 +03:00
Yohan Graterol 9f8cd33d43 Fix conflict for merge PR #726 2014-08-20 11:05:53 -05:00
Jay Shirley 6802967863 Merge remote-tracking branch 'upstream/master' 2014-08-19 15:52:58 -07:00
Bob Cribbs 0462f18680 Allow atomic update for the entire DictField 2014-08-19 23:38:36 +03:00
DavidBord 46da918dbe fix-#733: index_cls is ignored when deciding to set _cls as index prefix 2014-08-17 11:19:18 +03:00
DavidBord 2f72b23a0d fix-#725: queryset delete() should return the number of deleted objects 2014-08-10 14:58:39 +03:00
Jay Shirley 85336f9777 Relax the RegEx restrictions to allow the new ICAAN TLDs. 2014-08-08 09:11:05 -07:00
DavidBord 1e6a3163af fix-#620: saving document doesn't create new fields in existing collection 2014-08-05 17:29:14 +03:00
DavidBord e008919978 fix-#399: Not overriding default values when loading a subset of fields 2014-08-05 14:34:54 +03:00
Wilson Junior f17f8b48c2 small fixes for python2.6 2014-08-03 18:59:50 -04:00
Wilson Júnior b4d6f6b947 added documentation about CachedReferenceField 2014-07-30 09:32:33 -03:00
Wilson Júnior 6c0112c2be refs #709, added support to disable auto_sync 2014-07-25 18:12:26 -03:00
Wilson Júnior 87c97efce0 refs #709, added CachedReferenceField.sync_all to sync all documents on demand 2014-07-25 08:44:59 -03:00
Wilson Júnior 6c4aee1479 added CachedReferenceField restriction to use in EmbeddedDocument 2014-07-17 13:42:34 -03:00
Wilson Júnior 30fdd3e184 Added initial CachedReferenceField 2014-07-16 10:32:43 -03:00
Wilson Júnior 892ddd5724 added a wrapper to aggregate in Queryset.aggregate 2014-07-12 23:18:08 -03:00
Wilson Júnior 7b4d9140af merge #700 2014-07-08 09:19:15 -03:00
Wilson Júnior 30c01089f5 added ordering support for text queries 2014-07-08 08:38:41 -03:00
Wilson Júnior 89825a2b21 added skip to mongodb older 2014-07-07 23:45:44 -03:00
Wilson Júnior f7ebf8dedd Added support for text search and text_score. 2014-07-07 20:24:37 -03:00