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
Tristan Escalada
614b590551
documentation typo: inheritence
...
inheritence corrected to inheritance
only in the documentation, not in the code
2012-06-19 17:08:28 -03:00
Ross Lawley
e6317776c1
Fixes DBRef handling in _delta
...
refs: hmarr/mongoengine#518
2012-06-19 16:45:23 +01:00
Ross Lawley
1a97dfd479
Better fix for .save() _delta issue with DbRefs
...
refs: hmarr/mongoengine#518
2012-06-19 14:05:53 +01:00
Andrey Fedoseev
0b22c140c5
Add sensible __eq__ method to EmbeddedDocument
2012-05-22 22:31:59 +06:00
Ross Lawley
8840680303
Promoted BaseDynamicField to DynamicField
...
closes mongoengine/mongoengine#22
2012-05-17 21:54:17 +01:00
Ross Lawley
bab186e195
Reverted document.delete auto gridfs delete
2012-05-14 12:02:07 +01:00
Ross Lawley
ba298c3cfc
Save can be used in assignment
2012-05-09 15:37:07 +01:00
David Ignacio
e07ecc5cf8
Cleanup referenced GridFS files when a document is deleted
...
Note that drop_collection is not modified since there is no
guarantee that a GridFS collection holds files for only one
Document class. Otherwise you could drop files for other fields
or documents accidentally.
2012-05-05 01:33:08 -04:00
Ross Lawley
4ce1ba81a6
Merge branch 'dev-disable-indexing' of https://github.com/colinhowe/mongoengine
...
Conflicts:
mongoengine/queryset.py
2012-05-01 09:37:01 +01:00
Greg Banks
0bb9781b91
add "safe" and "write_options" parameters to QuerySet.insert similar to Document.save
2012-04-26 13:56:52 -07:00
Colin Howe
7e376b40bb
Add new meta option to Document: allow_index_creation.
...
Defaults to True. If set to False then MongoEngine will not ensure indexes exist
2012-03-19 20:27:08 +00:00
Robert Kajic
c272b7901f
Fix for bug where changes to a a embedded document field are not recorded if the root document was just created+saved.
2012-03-02 15:35:15 +01:00
Ross Lawley
a2eb876f8c
No longer always upsert on save
...
closes #407
2012-02-29 11:39:10 +00:00
Ross Lawley
1d7ea71c0d
DeReference is now used in a thread safe manner
...
No global / module instance is needed
Fixes #399
2012-02-29 10:31:33 +00:00
Ross Lawley
a59b518cf2
Updates to imports for future pymongo 2.2
2012-02-17 11:18:25 +00:00
Ross Lawley
6d9bfff19c
Started work on performance
...
Added an initial benchmark.py
Much more performant than 0.5.2 but still work todo.
2011-12-16 12:41:47 +00:00
Ross Lawley
11daf706df
Added Sharding support
...
Added shard_key meta, so save() and update() passes shard keys
to the pymongo query. Also made shard key fields immutable.
Closes #388 and #389
2011-12-12 16:13:19 +00:00
Ross Lawley
112e921ce2
Syntax cleaning
2011-12-07 01:34:36 -08:00
Ross Lawley
8d2bc444bb
db_alias using in model, queryset, reference fields, derefrence.
2011-12-07 01:16:36 -08:00
Ross Lawley
9188f9bf62
Added custom cascade kwarg options
...
Allows the user to overwrite any default kwargs
Closes #295
2011-11-30 08:54:33 -08:00
Ross Lawley
beacfae400
Removed use of _get_subclasses favouring get_document
...
_get_subclasses not actually required and causes issues
where Base Classes aren't imported but dont actually
need to be.
Fixes #271
2011-11-30 07:55:33 -08:00
Ross Lawley
fdc385ea33
Allow dynamic data to be deleted
...
Fixes #374
2011-11-30 03:06:46 -08:00
Ross Lawley
e1bb453f32
Configurable cascading saves
...
Updated cascading save logic - can now add meta or pass
cascade to save(). Also Cleaned up reset changed fields logic
as well, so less looping
Refs: #370 #349
2011-11-28 06:51:17 -08:00
Ross Lawley
83fff80b0f
Cleaned up dereferencing
...
Dereferencing now respects max_depth, so should be more performant.
Reload is chainable and can be passed a max_depth for dereferencing
Added an Observer for ComplexBaseFields.
Refs #324 #323 #289
Closes #320
2011-11-25 08:36:47 -08:00
Ross Lawley
e80144e9f2
Added multidb support
...
No change required to upgrade to multiple databases. Aliases are used
to describe the database and these can be manually registered or fall
through to a default alias using connect.
Made get_connection and get_db first class members of the connection class.
Old style _get_connection and _get_db still supported.
Refs: #84 #87 #93 #215
2011-11-22 08:01:14 -08:00
Wilson Júnior
3d817f145c
fixes for #315 issue
2011-10-12 18:28:40 -03:00
Ross Lawley
0624cdd6e4
Fixes collection creation post drop_collection
...
Thanks to Julien Rebetez for the original patch
closes [#285 ]
2011-10-11 02:26:33 -07:00
Ross Lawley
7b1860d17b
Fixes tree based circular references
...
Thanks to jpfarias for the fix.
Also normalised the other circular checks.
2011-10-10 09:16:32 -07:00
Sergey Chvalyuk
08288e591c
small optimizing fix
2011-10-03 05:16:17 -07:00
Ross Lawley
a7edd8602c
Added support for expando style dynamic documents.
...
Added two new classes: DynamicDocument and DynamicEmbeddedDocument
for handling expando style setting of attributes.
[closes #112 ]
2011-09-28 01:39:39 -07:00
Ross Lawley
bc9a09f52e
Document updates
2011-09-09 04:21:32 -07:00
Slavi Pantaleev
7913ed1841
Prevent double saving when doing a forced insert.
...
When doing save(force_insert=True) on a document missing an _id field,
the document was first getting inserted and then being saved a second
time.
Also refactatored the code a bit to make the intent
(insert/update/delta-update) cleaner, especially since
the `created` variable name was so confusing.
2011-07-30 00:52:37 +03:00
Ross Lawley
a4c197a83c
Added update() convenience method to a document
...
Thanks to @dcrosta for the initial code
[closes #229 ]
2011-07-13 14:15:46 +01:00