Commit Graph
369 Commits
Author SHA1 Message Date
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
Wilson Júnior fa4b820931 added support for db_alias in FileFields 2011-11-22 13:40:01 -02: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
Ross Lawley 63c5a4dd65 Fixes saving document schemas that have changed
Ensures that form defaults which are documents are
automatically marked as changed, so schemas can evolve
without migration issues.

[#360]
2011-11-22 07:34:08 -08:00
Adam ParrishandRoss Lawley 34646a414c Fixes bug using positional operator to update embedded documents.
append_field wasn't getting reset to True in the loop, so fields wouldn't
get appended to clean_fields after str was encountered

[#354]
2011-11-11 01:10:00 -08:00
Ross Lawley 4e44198bbd Clean up of choices code and added tests
[#284] [#314]
2011-11-04 01:45:44 -07:00
Ross Lawley 59bd72a888 Added tests for __repr__ fix 2011-11-01 02:15:31 -07:00
Ross Lawley 3ee60affa9 Renamed schema for errors
Now is `to_dict()` as is more explicit
[refs #344 #328]
2011-11-01 01:51:58 -07:00
Ross Lawley 558b8123b5 Merge branch 'validation-schema' of https://github.com/n1k0/mongoengine into validation-schema
Conflicts:
	mongoengine/base.py
	mongoengine/fields.py
2011-11-01 01:45:32 -07:00
Ross Lawley aa9ed614ad Merge branch 'master' of https://github.com/mjtamlyn/mongoengine into transform_update 2011-11-01 01:19:30 -07:00
Ross Lawley 7cd22aaf83 Removed debug print 2011-10-27 01:18:32 -07:00
Ross Lawley 5dc998ed52 Merge branch 'dev-bulkinsertsignal' of https://github.com/colinhowe/mongoengine into bulk 2011-10-27 01:13:59 -07:00
Ross Lawley 56d1139d71 Added ImageField Support
Thanks to @wpjunior for the patch
Closes [#298]
2011-10-27 00:58:47 -07:00
Nicolas Perriault 62480fe940 added a ValidatorError.schema properties which contains a dict representation of the whole validation error schema 2011-10-24 17:15:34 +02:00
Nicolas Perriault 3d7b30da77 first version of BC validation schema 2011-10-24 01:02:31 +02:00
Wilson Júnior 8e87648d53 added tests for get_or_create 2011-10-19 09:44:49 -02:00
Wilson Júnior 7f2b686ab5 added drop_collection for test 2011-10-19 06:55:05 -02:00
Wilson Júnior b09c52fc7e fixes for #325 issue 2011-10-19 06:30:41 -02: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
Marc Tamlyn 219d316b49 Fix iteration on querysets.
If iteration of a queryset was interrupted (by a break, or a caught
error), the next iterator would start from the second element as the
cursor had already moved to the first. This is fixed by adding a rewind
into the __iter__ method.
2011-10-05 13:26:57 +01:00
Pau Aliagas d59862ae6e Merge remote-tracking branch 'upstream/dev' into integration/uuid 2011-10-04 16:02:58 +02:00
Pau Aliagas 0a03f9a31a Add unit tests for UUIDField 2011-10-04 15:59:56 +02:00
Ross Lawley 6961a9494f Updates to ComplexFields
Required now means they cannot be empty [#302]
2011-10-04 04:26:56 -07:00
Ross Lawley 17728d4e74 Added tests for empty lists 2011-10-04 02:57:50 -07:00
Ross Lawley 60b6ad3fcf Added test for listfield fix
Added Pau Aliagas to authors
[closes #299]
2011-10-03 05:30:23 -07:00
Ross Lawley 823cf421fa Fixes to circular references.
Removes infinite looping
refs #294
2011-09-29 14:07:30 -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
Wilson Júnior a9cacd2e06 fixed embedded null item_frequencies 2011-09-20 08:56:30 -03:00
Ross Lawley f7fbb3d2f6 Relaxed field name checking on embedded documents 2011-09-20 03:45:11 -07:00
Colin Howe b91db87ae0 Pre and post bulk-insert signals 2011-09-09 19:17:40 +01:00
Ross Lawley 050542c29b Added InvalidDocumentError
Ensures defined documents are valid and users don't override core methods
by accident.

fixes #275
2011-09-09 17:36:40 +01:00
Ross Lawley 2bc3948726 Merge remote branch 'wpjunior/genericembeddedfield' into genericembeddedfield 2011-09-09 06:07:07 -07:00
Ross Lawley 1631788ab6 Now Raise an exception if subclasses are missing at querytime.
Beats returning None thanks to #aid for mentioning it on IRC
2011-08-24 13:37:39 +01:00
Ross Lawley bda716ef9d Improved update in test case for removing inheritance 2011-08-18 08:30:52 +01:00
Ross Lawley f549d8c0bc Merge pull request #263 from johnarnfield/dev
Added polygon support and unit tests
2011-08-17 13:46:40 -07:00
John Arnfield b037fb3e21 Added version check to the polygon test to ensure server version >= 1.9 2011-08-17 21:23:40 +01:00
John Arnfield bd005575c4 Added geospatial polygon lookups & tests 2011-08-17 20:11:05 +01:00
John Arnfield ca3b004921 Added tests for polygon queries 2011-08-17 20:04:38 +01:00
Wilson Júnior b76590dc01 more tests for embedded lists 2011-08-17 09:32:04 -03:00
Ross Lawley 3c8cbcfee7 Added tests for showing how to set embedded document indexes
refs #257
2011-08-16 16:50:50 +01:00
Ross Lawley 3f301f6b0f Finishing touches to where implementation - thanks to dcrosta
Refs #242
2011-08-16 10:32:21 +01:00
Ross Lawley 89ad7ef1ab Merge branch 'dev' into feature/where 2011-08-16 09:54:56 +01:00
Wilson Júnior 331f8b8ae7 fixes dereference for documents (allow_inheritance = False) 2011-08-09 14:31:26 -03:00
Ross Lawley 3f3f93b0fa Fixing delta bug for dict fields 2011-07-29 15:48:29 +01:00
Wilson Júnior 6471c6e133 added GenericEmbeddedDocumentField 2011-07-27 08:45:15 -03:00
Ross Lawley e3cbeb9df0 Merge pull request #243 from wpjunior/sequencefield_fixes
Sequencefield fixes
2011-07-22 06:34:43 -07:00
Wilson Júnior 130fb9916d fixes for SequenceField 2011-07-22 10:19:41 -03:00
Ross Lawley ac72722e57 Fixing bug setting a value that equates to false 2011-07-22 13:51:11 +01:00
Dan Crosta 13afead9fb add where() method to QuerySet 2011-07-20 12:41:20 -04:00