Axel Haustant
52c7b68cc3
Restore Py26 compatibility on assertRaises
2015-04-13 22:28:58 +02:00
Axel Haustant
ddbcc8e84b
Ensure meta.strict does not bypass constructor check
2015-04-13 18:48:42 +02:00
Axel Haustant
cd2d9517a0
Added 'strict' meta parameter
2015-04-13 17:49:08 +02:00
Catstyle
175659628d
fix mark_as_changed: handle higher/lower level changed fields correctly to avoid conflict update error
2015-04-10 11:31:31 +08:00
Eremeev Danil
f77f45b70c
_get_changed_fields fix for embedded documents with id field.
...
removed commented out piece of code
added author and record to changelog
2015-04-09 12:36:48 +05:00
Michael Chase
a6a7cba121
Current class fields when unpickling. Fixes #888
...
Optimize dereferencing map by using sets.
2015-04-08 19:40:43 -07:00
mrigal
7a749b88c7
added new test like defined in issue #712 and changed ObjectIdField to_python() method to use a try except similar to other Field classes
2015-04-08 15:38:49 +02:00
David Bordeynik
bb77838b3e
fix-#914: ListField of embedded docs doesn't set the _instance attribute when iterating over it
2015-04-02 08:59:24 +03:00
David Bordeynik
de0e5583a5
Fix #595 : Support += and *= for ListField
2015-03-29 09:28:26 +03:00
J. Fernando Sánchez
2d075c4dd6
Added test for new_file after saved as none. #714
2015-03-23 12:21:21 +02:00
Matthew Ellison
42721628eb
Added EmbeddedDocumentListField Implementation
...
- Added new field type: EmbeddedDocumentListField.
- Provides additional query ability for lists of embedded documents.
- Closes MongoEngine/mongoengine#503 .
2015-02-20 11:18:40 -05:00
Jimmy Shen
ce9d0d7e82
Fix #864 : ComplexDateTimeField should fall back to None when null=True
2015-02-19 09:47:38 +02:00
David Bordeynik
129632cd6b
Fix #863 : Request Support for $min, $max Field update operators
2015-02-17 21:48:25 +02:00
David Bordeynik
5c3d91e65e
Fix #866 : does not follow
2015-02-16 12:25:37 +02:00
David Bordeynik
225c31d583
Fix #766 : Add support for operator
2015-02-15 15:05:07 +02:00
David Bordeynik
25298c72bb
Fix #877 : Fix tests for pymongo 2.8+
2015-02-15 10:02:22 +02:00
David Bordeynik
cbb0b57018
Fix #872 : No module named 'django.utils.importlib' (Django dev)
2015-02-15 00:10:00 +02:00
Matthew Ellison
213a0a18a5
Updated Unit Tests for Field Choices of Documents
...
- Added Unit Test with Invalid EmbeddedDocument Choice.
- Updated Broken Link in Author's File
2015-01-12 10:11:42 -05:00
Matthew Ellison
1a24d599b3
Field Choices Now Accept Subclasses of Documents
...
- Fields containing 'choices' of which a choice is an
EmbeddedDocument or Document will now accept subclasses of that
choice.
2015-01-11 20:54:59 -05:00
Matthew Ellison
db36d0a375
Ensure Indexes before Each Save
...
- Rely on caching within the PyMongo driver to provide lightweight calls
while indices are cached.
- Closes MongoEngine/mongoengine#812 .
2014-12-04 08:45:15 -05:00
Omer Katz
ff659a0be3
Merge pull request #815 from MRigal/master
...
fixed bug for queryset.distinct to work also on embedded documents, not ...
2014-12-04 14:21:04 +02:00
Antoine Français
7bb65fca4e
Fix crash when applying deletion rules
...
When deleting a document references by other, if that refence is
defined on an abstract document, the operation fails, because it tries
to apply deletion on the abstract class which doesn't have a QuerySet.
Fix is simply to ignore document classes which are defined abstract when
applying rules on all classes referencing the document.
2014-12-04 11:34:23 +01:00
mrigal
8aaa5951ca
fixed order of list for the test to pass
2014-12-03 13:13:07 +01:00
Omer Katz
e5a636a159
Added a test that verifies distinct operations on nested embedded documents.
2014-12-03 11:09:05 +02:00
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
Rik
80f80cd31f
fixed more tests that were using undefined model fields
2014-11-29 23:20:31 -02:00
Rik
1cac35be03
using python 2.6 compatible way of assertRaises
2014-11-29 23:20:30 -02:00
Rik
6d48100f44
add test if FieldDoesNotExist is raised
...
When trying to set an undefined field.
2014-11-29 23:20:30 -02:00
Rik
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
Rik
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 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