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
5cb2812231
Reverting Fixed hashing of EmbeddedDocuments ( #348 )
2013-06-05 13:03:15 +00:00
Ross Lawley
f8904a5504
Explicitly set w:1 if None in save
2013-06-05 12:14:22 +00: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
d47134bbf1
Reload forces read preference to be PRIMARY ( #355 )
2013-06-04 11:03:50 +00:00
Ross Lawley
4244e7569b
Added pre_save_post_validation signal ( #345 )
2013-06-04 09:35:44 +00:00
Alice Bevan-McGregor
04592c876b
Moved pre_save after validation and determination of creation state; added pre_save_validation where pre_save had been.
2013-05-29 12:04:53 -04:00
Daniel Axtens
36a3770673
If you need to read from another database, use switch_db not switch_collection.
2013-05-20 15:49:01 +10:00
Ross Lawley
2c119dea47
Upserting is the only way to ensure docs are saved correctly ( #306 )
2013-05-07 10:34:13 +00:00
Ross Lawley
e58b3390aa
Removed import with from future
2013-05-01 08:48:14 +00:00
Ross Lawley
9c1cd81adb
Add support for new geojson fields, indexes and queries ( #299 )
2013-04-30 14:46:23 +00:00
Ross Lawley
5e65d27832
PEP8 x == True should be x is True
2013-04-26 11:46:12 +00:00
Ross Lawley
7765f272ac
Documentation api and reference cleanups
2013-04-26 08:46:46 +00:00
Ross Lawley
fe62c3aacb
Cascading saves now default to off ( #291 )
2013-04-25 10:24:33 +00:00
Ross Lawley
c16e6d74e6
Updated connection to use MongoClient ( #262 , #274 )
2013-04-22 15:07:15 +00:00
Ross Lawley
51e50bf0a9
Merge branch 'master' into 0.8M
...
Conflicts:
AUTHORS
docs/django.rst
mongoengine/base.py
mongoengine/queryset.py
tests/fields/fields.py
tests/queryset/queryset.py
tests/test_dereference.py
tests/test_document.py
2013-04-17 11:57:53 +00:00
Ross Lawley
f970d5878a
Merge remote-tracking branch 'origin/pr/242'
...
Conflicts:
tests/test_document.py
2013-04-16 20:07:03 +00:00
Ross Lawley
37740dc010
Added kwargs to doc.save to help interop with django ( #223 , #270 )
2013-04-12 14:05:08 +00:00
benoitlouy
0d2e84b16b
Fix for issue #237 : clearing changed fields recursively in EmbeddedDocuments after saving a Document
2013-02-28 00:37:34 -05:00
Ross Lawley
4177fc6df2
Can call del Doc.attr to delete field value
2013-01-28 15:57:33 +00:00
Ross Lawley
d90890c08e
Merge branch 'single-work-op' of https://github.com/njoyce/mongoengine into 211
...
Conflicts:
mongoengine/document.py
tests/test_document.py
2013-01-28 15:05:12 +00:00
Ross Lawley
e38bf63be0
Fixed overriding objects with custom manager ( #58 )
2013-01-24 11:29:51 +00:00
Ross Lawley
9797d7a7fb
Added switch_collection context manager and method ( #220 )
2013-01-23 21:19:21 +00:00
Ross Lawley
3a6dc77d36
Added no_dereference context manager ( #82 )
...
Reorganised the context_managers as well
2013-01-23 19:05:44 +00:00
Ross Lawley
ea46edf50a
Added switch_db method to document instances ( #106 )
2013-01-23 16:07:07 +00:00
Ross Lawley
445f9453c4
Fixed reverse delete rule with inheritance ( #197 )
2013-01-22 16:38:07 +00:00
Ross Lawley
692f00864d
Fixed inheritance and unique index creation ( #140 )
2013-01-22 15:16:58 +00:00
Ross Lawley
344dc64df8
Updated authors and changelog #163
2013-01-22 14:05:06 +00:00
Ross Lawley
473425a36a
Merge branch 'getlasterror' of https://github.com/helduel/mongoengine into 163
2013-01-22 13:55:06 +00:00
Nick Joyce
7bb9c7d47f
Ensure that the update actions are grouped rather than serial.
...
This is a performance update. When multiple properties of the same
entity have been deleted and modified, 2 calls to update the entity are
made, one {"$set": … } and another {"$unset": … }. This is 2 network
interface calls which is a performance killer (even at lan speeds).
Fixes : #210
2013-01-07 15:03:29 +00:00
helduel
1a93b9b226
More precise "created" keyword argument signals
...
If a document has a user given id value, the post_save signal always got the
"created" keyword argument with False value (unless force_insert is True).
This patch uses the result of getlasterror to check whether the save was an
update or not.
2012-11-08 16:30:29 +01:00
Ross Lawley
8706fbe461
Updated index creation now tied to Document class (( MongoEngine/mongoengine#102 )
2012-11-07 15:04:45 +00:00
Ross Lawley
1986e82783
Added clean method to documents for pre validation data cleaning ( MongoEngine/mongoengine#60 )
2012-11-07 12:12:28 +00:00
Ross Lawley
7d90aa76ff
Add _instance to Embedded Documents
...
Fixes MongoEngine/mongoengine#139
2012-11-06 16:04:23 +00:00
Ross Lawley
3d5b6ae332
Inheritance is off by default ( MongoEngine/mongoengine#122 )
2012-10-22 19:29:26 +00:00
Ross Lawley
6f29d12386
Changed the inheritance model to remove types
...
The inheritance model has changed, we no longer need to store an array of
`types` with the model we can just use the classname in `_cls`.
See the upgrade docs for information on how to upgrade
MongoEngine/mongoengine#148
2012-10-15 13:48:02 +00:00
Ross Lawley
6a4351e44f
Fixed reload issue with ReferenceField where dbref=False ( MongoEngine/mongoengine#138 )
2012-09-24 18:49:29 +00:00
Ross Lawley
a2183e3dcc
Reverted EmbeddedDocuments meta handling.
...
You now can turn off inheritance (MongoEngine/mongoengine#119 )
2012-09-07 13:23:46 +01:00
Ross Lawley
52f85aab18
Merge branch 'master' of https://github.com/dimonb/mongoengine
...
Conflicts:
mongoengine/base.py
2012-09-03 11:00:41 +01:00
Dmitry Balabanov
f27debe7f9
Respect sharding key when delete object from collection
2012-08-30 12:40:44 +04:00
Ross Lawley
1c5e6a3425
NotUniqueError gracefully replacing ambiguous OperationError when appropriate
2012-08-24 10:38:10 +01:00
Ross Lawley
4ffa8d0124
Updated ReferenceField's to optionally store ObjectId strings.
...
This will become the default in 0.8 (MongoEngine/mongoengine#89 )
2012-08-23 11:02:38 +01:00
Ross Lawley
b1eeb77ddc
Added FutureWarning - save will default to cascade=False
in 0.8
2012-08-21 17:45:51 +01:00
Ross Lawley
90fa0f6c4a
Add flexibility for fields handling bad data ( MongoEngine/mongoengine#78 )
2012-08-17 16:02:33 +01:00
Ross Lawley
66279bd90f
Post refactor cleanups (ref: meta cleanups)
2012-08-17 11:58:57 +01:00
Ross Lawley
19da228855
Cleaned up the metaclasses for documents
...
Refactored and clarified intent and
tidied up
2012-08-17 11:53:46 +01:00
Ross Lawley
2bb9493fcf
Updated doc
2012-08-13 15:05:01 +01:00
Laine
91aa90ad4a
Added Python 3 support to MongoEngine
2012-08-01 17:21:48 -07:00
Chris Faulkner
1304f2721f
Proper syntax for RST notes (so they actually render).
2012-07-24 14:06:43 -07:00
Ross Lawley
ae39ed94c9
Fixed cascade save edge case
...
refs MongoEngine/mongoengine#40
2012-07-19 11:52:26 +01:00