239 Commits

Author SHA1 Message Date
mrigal
c5ed308ea5 comments update after having tested PyMongo 3.0.1 2015-05-07 12:47:31 +02:00
mrigal
571a7dc42d Fix last issue with binary field as primary key and skipped new test 2015-05-07 12:47:30 +02:00
mrigal
76adb13a64 Minor text and comments enhancements 2015-05-07 12:47:30 +02:00
mrigal
3db896c4e2 work-around for pymongo 3 bug 2015-05-07 12:47:30 +02:00
mrigal
48316ba60d implemented global IS_PYMONGO_3 2015-05-07 12:47:29 +02:00
mrigal
ccbd128fa2 first adaptations after comments and find-outs 2015-05-07 12:47:29 +02:00
mrigal
775c8624d4 change to try to address issues due to new save() behaviour, not satisfying, some tests are still failing 2015-05-07 12:47:29 +02:00
Stefan Wojcik
9bdc320cf8 dont send a "cls" option to ensureIndex (related to https://jira.mongodb.org/browse/SERVER-769) 2015-05-06 11:25:45 +02:00
Axel Haustant
2bfb195ad6 Document FieldDoesNotExist and meta.strict 2015-04-13 18:07:48 +02:00
David Bordeynik
3234f0bdd7 Merge pull request #887 from rutsky/patch-2
fix reference format: "attr:`auto_create_index`"
2015-02-20 22:18:39 +02:00
Vladimir Rutsky
4ae60da58d fix reference format: "attr:auto_create_index" 2015-02-20 19:59:36 +03:00
Matthew Ellison
42721628eb Added EmbeddedDocumentListField Implementation
- Added new field type: EmbeddedDocumentListField.
- Provides additional query ability for lists of embedded documents.
- Closes MongoEngine/mongoengine#503.
2015-02-20 11:18:40 -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
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
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
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
Slam
e0f1e79e6a Minor typos fixes in docs 2014-11-24 16:57:43 +02:00
André Ericson
3569529a84 Fix KeyError on reload() from a DynamicDocument
If the document is in memory and a field is deleted from the db,
calling reload() would raise a KeyError.
2014-11-08 19:11:51 -03:00
Dmitry Konishchev
4752f9aa37 Add Document.modify() method 2014-09-30 15:30:01 +04:00
DavidBord
c1b202c119 fix-#746: Stop ensure_indexes running on a secondaries unless connection is through mongos 2014-08-24 10:48:54 +03:00
Wilson Júnior
f7ebf8dedd Added support for text search and text_score. 2014-07-07 20:24:37 -03:00
Ross Lawley
324e3972a6 Merge pull request #567 from tomprimozic/master
Implemented equality between Documents and DBRefs
2014-06-27 11:37:24 +01:00
Ross Lawley
9cc4359c04 Added the ability to reload specific document fields #100 2014-06-27 11:10:14 +01:00
Ross Lawley
cb8cd03852 Merge pull request #594 from idlead/feature/post_save_delta
post_save signal should have delta information about field changes #594 #589
2014-06-27 10:02:08 +01:00
Ross Lawley
8267ded7ec Merge branch 'master' into pr/636 2014-06-27 09:29:19 +01:00
Ross Lawley
bc66fb33e9 Merge branch 'master' into pr/625 2014-06-26 16:48:12 +01:00
Sagiv Malihi
9835b382da added __slots__ to BaseDocument and Document
changed the _data field to static key-value mapping instead of hash table
This implements #624
2014-06-10 16:11:27 +03:00
Ronald van Rij
babbc8bcd6 When using autogenerated document ids in a sharded collection, do set that id back into the Document 2014-05-06 09:34:16 +02:00
Vlad Zloteanu
ef55e6d476 fixes MongoEngine/mongoengine#589 2014-03-01 17:51:59 +01:00
Frank Battaglia
db1e69813b add atomic conditions to save
Conflicts:
	mongoengine/document.py
2014-02-24 10:57:32 -05:00
tprimozi
c5c7378c63 Implemented equality between Documents and DBRefs 2014-02-04 13:41:17 +00:00
Ross Lawley
6d5e7d9e81 Calling reload on deleted / nonexistant documents raises DoesNotExist (#538) 2014-01-24 14:10:55 +00:00
Ross Lawley
0277062693 Stop ensure_indexes running on a secondaries (#555) 2014-01-24 13:17:52 +00:00
Ross Lawley
1b62dd5c40 Fix duplicate error check 2014-01-14 10:01:39 +00:00
Ross Lawley
a2a698ab0e Fixed EmbeddedDocument with ReferenceField equality issue (#502) 2013-11-29 12:46:18 +00:00
Olivier Cortès
f30208f345 Fix the ._get_db() attribute after a Document.switch_db()
Without this patch, I've got:

```
myobj._get_db()

<bound method TopLevelDocumentMetaclass._get_db of <class 'oneflow.core.models.nonrel.Article'>>

```

I need to `myobj._get_db()()` to get the database.

I felt this like a bug.

regards,
2013-08-12 19:12:53 +02:00
Ross Lawley
0c43787996 Fixed indexing - turn off _cls (#414) 2013-07-30 11:43:52 +00:00
Ross Lawley
4209d61b13 Document.select_related() now respects db_alias (#377) 2013-07-10 12:49:19 +00:00
Ross Lawley
fa83fba637 Reload uses shard_key if applicable (#384) 2013-07-10 11:18:49 +00:00
Ross Lawley
af86aee970 _dynamic field updates - fixed pickling and creation order
Dynamic fields are ordered based on creation and stored in _fields_ordered (#396)
Fixed pickling dynamic documents `_dynamic_fields` (#387)
2013-07-10 10:57:24 +00:00
Ross Lawley
9867e918fa Fixed weakref being valid after reload (#374) 2013-06-21 11:04:29 +00:00
Ross Lawley
f1a1aa54d8 Added full_result kwarg to update (#380) 2013-06-21 10:19:40 +00:00
Ross Lawley
254efdde79 Merge remote-tracking branch 'origin/pr/364' into 364 2013-06-07 08:25:42 +00:00
Stefan Wojcik
ba7101ff92 list_indexes support for multiple inheritance 2013-06-06 22:22:43 -07:00
Stefan Wojcik
a2457df45e make sure to only search for indexes in base classes inheriting from TopLevelDocumentMetaclass 2013-06-06 19:14:21 -07:00
Stefan Wojcik
305540f0fd better comment 2013-06-06 17:21:27 -07:00
Stefan Wojcik
c2928d8a57 list_indexes and compare_indexes class methods + unit tests 2013-06-06 17:16:03 -07:00
Ross Lawley
7451244cd2 Fixed cascading saves which weren't turned off as planned (#291) 2013-06-06 21:04:54 +00:00
Ross Lawley
dc3b09c218 Improved cascading saves write performance (#361) 2013-06-06 16:36:17 +00:00