823 Commits

Author SHA1 Message Date
Ross Lawley
ac72722e57 Fixing bug setting a value that equates to false 2011-07-22 13:51:11 +01:00
Wilson Júnior
382b9a61a8 Merge branch 'dev' of git://github.com/hmarr/mongoengine into db_field_maps_tweaks 2011-07-22 09:25:59 -03:00
Dan Crosta
13afead9fb add where() method to QuerySet 2011-07-20 12:41:20 -04:00
Ross Lawley
72aa191e70 Stop abstract classes being used in the document_registry 2011-07-20 11:58:13 +01:00
Ross Lawley
0d1804461d Updated handling setting of object managers and inheritance 2011-07-19 22:12:09 +01:00
Wilson Júnior
273412fda1 tweaks for _db_field_map 2011-07-19 14:48:38 -03:00
Wilson Júnior
49764b51dc tweaks for _db_field_map 2011-07-19 14:43:32 -03:00
Ross Lawley
5834fa840c Tweaked SequenceField so that it doesn't increment on creation.
[refs #238]
2011-07-19 16:51:26 +01:00
Ross Lawley
5eb895b952 Merge remote branch 'origin/dev' into feature/sequence_field 2011-07-19 16:04:42 +01:00
Ross Lawley
d5fb3a9167 Merge pull request #240 from wpjunior/db_field_fixes
Awesome - scarily similar to the patch I started!
2011-07-19 07:37:57 -07:00
Wilson Júnior
cb324595ef fixerrors 2011-07-19 07:36:35 -03:00
Wilson Júnior
fa39789bac added SequenceField 2011-07-18 12:44:28 -03:00
Ross Lawley
bbd3a6961e Fixed typo in tutorial
[closes #235] Thanks @mulka
2011-07-18 08:35:29 +01:00
Ross Lawley
6eb0387a78 Merge pull request #234 from dcrosta/get-or-404
Get or 404 now handles validation errors as well.
Thanks @dcrosta
2011-07-14 22:38:46 -07:00
Dan Crosta
b3ef67a544 get_document_or_404 raises 404 if given an invalid ObjectId
(and possibly on other errors, not sure what else raises
ValidationError)
2011-07-14 18:43:11 -04:00
Ross Lawley
72995a4b3e Fixed changing default values to False for embedded items 2011-07-13 16:06:40 +01:00
Ross Lawley
7395ce5b22 Updating changelog 2011-07-13 16:05:17 +01: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
Ross Lawley
7a3412dc13 Added helper for reseting the index cache 2011-07-13 09:54:41 +01:00
Ross Lawley
e079924632 Added extra test for update / update_one
[closes #231]
2011-07-12 14:43:21 +01:00
Leo Honkanen
7f0d3638ba guard against potentially destructive updates with no update parameters 2011-07-12 16:10:47 +03:00
Ross Lawley
cace665858 _delta checking didn't handle db_field_names at all
Fixed and added tests, thanks to @wpjunior and @iapain for initial test cases
[fixes #226]
2011-07-12 10:20:36 +01:00
Ross Lawley
2a8d001213 Improvements to indexes and efficiencies
Thanks to @dcrosta for the patches
closes #225
2011-07-11 17:02:23 +01:00
Ross Lawley
a2b0266e01 Merge branch 'dev' into indexpatches 2011-07-11 16:58:17 +01:00
Ross Lawley
1452d3fac5 Fixed item_frequency methods to handle null values
[fixes #216]
2011-07-11 16:50:31 +01:00
Ross Lawley
031c507fde Merge pull request #224 from dcrosta/user-unique-index
User unique index - thanks to @dcrosta
2011-07-11 08:08:52 -07:00
Ross Lawley
0fb629e24c Added cascading deletes
Also ensured that unsetting works when not the default value of a field
2011-07-11 16:01:48 +01:00
Dan Crosta
0847687fd1 don't create extra index on _types (fix #222)
mongodb will use an index that begins with _types to service queries
against _types, so the extra index is only needed if no other fields are
indexed in the document. to be safe, we explicitly check all indexes to
see if any begins with _types, and only then prevent creation of the
additional index on _types.
2011-07-11 10:15:55 -04:00
Dan Crosta
859de712b4 only create indexes on first collection access (fix #223) 2011-07-11 09:44:28 -04:00
Dan Crosta
803164a993 add unique index on User.username 2011-07-11 08:38:43 -04:00
Ross Lawley
147e33c3ca Merge remote branch 'origin/dev' into dev 2011-07-11 09:23:38 +01:00
Ross Lawley
dc5a613bc7 Fixes conversion of null genericreferences in querysets
closes #211
2011-07-11 09:19:27 +01:00
Ross Lawley
16390c1dec Merge pull request #217 from farazdagi/fix/typo-in-quering-db-docs
Fix/typo in quering db docs
2011-07-02 12:18:32 -07:00
Victor Farazdagi
4e6f91ae77 Typo fixed in "Quering The Db" guide. 2011-07-02 19:48:21 +04:00
Ross Lawley
556e620c7a Fixes recursion error when resetting changed fields
Fixes #214  - thanks to wpjunior for the test case
2011-07-01 08:44:46 +01:00
Ross Lawley
8e1d701c27 Fixed infinite recursion bug in _geo_indices()
Fixes #213  Thanks to joshink for the bug report
2011-06-30 10:32:05 +01:00
Ross Lawley
d51d95a28e Merge pull request #212 from zakj/dev
Added GridFSProxy.__nonzero__ - thanks to zakj for the fix
2011-06-30 01:57:00 -07:00
Zak Johnson
3d15a3b3e2 Add GridFSProxy.__nonzero__
For documents that do not have a value set for a given field, most field types
return None (or [] in the case of ListField). This makes it easy to test
whether a field has been set using "if doc.field". FileFields, on the other
hand, always return a GridFSProxy. Adding GridFSProxy.__nonzero__ which simply
checks for a grid_id allows the same boolean-test pattern for FileFields, as
well.
2011-06-29 20:48:39 -07:00
Ross Lawley
84e611b91e Tweak to dereferencing 2011-06-27 16:46:39 +01:00
Ross Lawley
4036e9fe34 Moved private method to make class more readable 2011-06-27 13:17:41 +01:00
Ross Lawley
b039a2293f Updated documentation about dereferencing
Refs #206
2011-06-27 12:42:26 +01:00
Ross Lawley
87f486c4f1 Added select_related() and refactored dereferencing
Added a dereference class to handle both select_related
 / recursive dereferencing and fetching dereference.

Refs #206
2011-06-27 12:25:49 +01:00
Ross Lawley
14be7ba2e2 Added support for the $ positional operator
closes #205
2011-06-21 14:50:11 +01:00
Ross Lawley
09c32a63ce Fixes bug with appending post save - due to lists not being reset 2011-06-21 12:34:14 +01:00
Ross Lawley
08ba51f714 Updated geo_index checking to be recursive
Fixes #127 - Embedded Documents can declare geo indexes and have
them created automatically
2011-06-20 15:41:23 +01:00
Ross Lawley
e3cd398f70 Changed default collection naming
Also added upgrade text
2011-06-20 14:00:06 +01:00
Ross Lawley
f41c5217c6 Added a cleaner way to get collection names
Also handles dynamic collection naming - refs #180.
2011-06-20 11:48:12 +01:00
Ross Lawley
1b0323bc22 Added document mixin support
For extendable / reusable documents
Fixes #204
2011-06-20 09:44:53 +01:00
Ross Lawley
e04e5f42ef Added test inheriting document from another file works
Closes #28
2011-06-20 08:46:40 +01:00
Ross Lawley
c24bc77c17 Fixes depreciation warnings in Django Auth.
Closes #156
2011-06-17 15:07:27 +01:00