2227 Commits

Author SHA1 Message Date
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
Yohan Graterol
0ffe79d76c Merge pull request #823 from mmelliso/mmelliso/fix#812
Ensure Indexes before Each Save (Resolves #812)
2014-12-05 11:01:02 -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
Wilson Júnior
8485b12102 Merge pull request #821 from 3lnc/Document.switch_docstring_fix
Fixes #811. Fixes reflinks
2014-12-04 09:28:11 -02:00
Wilson Júnior
d889cc3c5a Merge pull request #825 from idlead/fix/reverse_delete_rules_on_abstract_documents
Fix crash when applying deletion rules
2014-12-04 09:23:59 -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
Matthieu Rigal
d58f3b7520 Merge pull request #1 from thedrow/patch-1
Added a test that verifies distinct operations on nested embedded docume...
2014-12-03 13:10:27 +01:00
Omer Katz
e5a636a159 Added a test that verifies distinct operations on nested embedded documents. 2014-12-03 11:09:05 +02:00
Slam
51f314e907 Doc fixes, thanks @3Inc
Author:    Slam <3lnc.slam@gmail.com>
Date:      Fri Nov 28 13:10:38 2014 +0200
2014-12-02 00:37:06 -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
79705fbf11 moved initialization of _created before FieldDoesNotExist check
Because otherwise we'll get a FieldDoesNotExist error on the field
_created.
2014-11-29 23:20:30 -02:00
Rik
191a4e569e added ints in string.format() for 2.6 compability 2014-11-29 23:20:30 -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
4627af3e90 add FieldDoesNotExist exception to __all__
So it will be available when you do:
    from mongoengine import *
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
Rik
06064decd2 check for dynamic document, exclude id pk and _cls 2014-11-29 23:20:30 -02:00
Rik
4cca9f17df Check if undefined fields are supplied on document
If an undefined field is supplied to a document instance, a
`FieldDoesNotExist` Exception will be raised.
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
Slam
2954017836 Fixes #811. Fixes reflinks 2014-11-30 00:23:40 +02:00
mrigal
a03262fc01 implemented ability to return instances and not simple dicts for distinct on subdocuments 2014-11-28 16:23:23 +01:00
mrigal
d65ce6fc2c fixed bug for queryset.distinct to work also on embedded documents, not just on lists of embedded documents 2014-11-28 13:54:33 +01:00
Yohan Graterol
d27e1eee25 Merge pull request #806 from mmelliso/mmelliso/indexing
Generate Unique Indices for Lists of EmbeddedDocs
2014-11-25 02:37:53 -05:00
Yohan Graterol
b1f00bb708 Merge pull request #810 from 3lnc/Doc_fixes
Minor typos fixes in docs
2014-11-25 02:36:59 -05:00
Slam
e0f1e79e6a Minor typos fixes in docs 2014-11-24 16:57:43 +02:00
Matthew Ellison
d70b7d41e8 Update to Changelog to include Fix for #358 2014-11-21 07:29:50 -05: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
Yohan Graterol
263616ef01 Merge pull request #804 from CestDiego/patch-1
Big typo fix for allow_inheritance page
2014-11-19 21:20:02 -05:00
Diego Berrocal
285da0542e Update AUTHORS with @cestdiego 2014-11-19 09:39:51 -05:00
Diego Berrocal
17f7e2f892 Big typo fix for allow_inheritance page 2014-11-19 02:49:08 -05:00
Yohan Graterol
a29d8f1d68 Merge pull request #803 from DavidBord/fix-515
fix-#515: sparse fields
2014-11-16 22:04:24 -05:00
David Bordeynik
8965172603 fix-#515: sparse fields 2014-11-14 21:45:46 +02:00
David Bordeynik
03c2967337 Update changelog & authors - #801 2014-11-13 20:47:31 +02:00
David Bordeynik
5b154a0da4 Merge pull request #801 from mikhailmoshnogorsky/patch-1
write_concern not in params of Collection#remove
2014-11-13 16:19:56 +02:00
mikhailmoshnogorsky
b2c8c326d7 write_concern not in params of Collection#remove 2014-11-12 17:00:07 -05:00
Yohan Graterol
96aedaa91f Install Django dev from repo with pip 2014-11-12 12:06:20 -05:00
Omer Katz
a22ad1ec32 Exclude Django 1,7 and Python 2.6 since Django 1.7 doesn't support 2.6. 2014-11-11 09:09:21 +02:00
Omer Katz
a4244defb5 Fixed build matrix. 2014-11-10 09:41:29 +02:00
Omer Katz
57328e55f3 Bumped django versions and added 1.7.1. 2014-11-10 09:37:35 +02:00
Yohan Graterol
87c32aeb40 Merge branch 'aericson-better_basedocument_eq' 2014-11-09 21:32:58 -05:00
Yohan Graterol
2e01e0c30e Added merge to changelog.rst 2014-11-09 21:32:50 -05:00
Yohan Graterol
a12b2de74a Fix merge MongoEngine/mongoengine#799 2014-11-09 21:31:56 -05:00
Yohan Graterol
6b01d8f99b Merge branch 'DavidBord-fix-734' 2014-11-09 21:28:12 -05:00
Yohan Graterol
eac4f6062e Fix merge in docs/changelog.rst 2014-11-09 21:28:03 -05:00