Stefan Wójcik
835d3c3d18
Improve the health of this package ( #1428 )
2016-12-11 18:49:21 -05:00
Stefan Wójcik
3c455cf1c1
Improve health of this package ( #1409 )
...
* added flake8 and flake8-import-order to travis for py27
* fixed a test that fails from time to time depending on an order of a dict
* flake8 tweaks for the entire codebase excluding tests
2016-11-28 19:00:34 -05:00
Younes JAAIDI
4650e5e8fb
Fix MapField in order to handle unicode keys.
2016-03-25 12:42:00 +01:00
Matthieu Rigal
0aeb1ca408
Various fixes again
2015-06-24 00:50:36 +02:00
mrigal
778c7dc5f2
general pep8 and more clean-up
2015-06-23 23:15:44 +02:00
Emmanuel Leblond
1951b52aa5
Fix #1017 (document clash between same ids but different collections)
2015-06-11 14:55:04 +02:00
Eremeev Danil
ebaba95eb3
fixed same bug for nested List inside MapField, little code refactoring, added test for nested list and nested reference fields
2015-04-30 09:33:19 +05:00
Eremeev Danil
31f7769199
percent string formatting changed to format method
2015-04-30 09:33:19 +05:00
elephant
7726be94be
fixed wrong _delta results on nested MapFields #931
2015-04-30 09:33:18 +05:00
Michael Chase
a6a7cba121
Current class fields when unpickling. Fixes #888
...
Optimize dereferencing map by using sets.
2015-04-08 19:40:43 -07: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
DavidBord
9b30afeca9
fix-#397: Allow specifying the '_cls' as a field for indexes
2014-08-24 10:51:49 +03:00
Clay McClure
170693cf0b
Follow ReferenceFields in EmbeddedDocuments with select_related
...
For the following structure:
class Playlist(Document):
items = ListField(EmbeddedDocumentField("PlaylistItem"))
class PlaylistItem(EmbeddedDocument):
song = ReferenceField("Song")
class Song(Document):
title = StringField()
this patch prevents the N+1 queries otherwise required to fetch all
the `Song` instances referenced by all the `PlaylistItem`s.
2014-07-03 13:14:45 -04:00
Brian Helba
17d6014bf1
Fix some minor spelling and grammar in documentation
2014-06-29 23:07:28 -04:00
Ross Lawley
5d0cab2052
Merge branch 'master' into pr/539
...
Conflicts:
mongoengine/base/datastructures.py
2014-06-27 12:20:44 +01:00
Ross Lawley
f31b2c4a79
Merge branch 'master' into pr/368
2014-06-27 11:32:19 +01:00
Damien Churchill
db7f93cff3
improved update queries for BaseDict & BaseList
...
Migrate changes to include updating single elements of ListFields as
well as MapFields by adding the same changes to BaseList. This is
done by ensuring all BaseDicts and BaseLists have the correct name
from the base of the nearest (Embedded)Document, then marking changes
with their key or index when they are changed.
Tests also all fixed up.
2014-03-12 15:07:40 +00:00
Ross Lawley
661398d891
Fixed dereference issue with embedded listfield referencefields ( #439 )
2013-08-20 10:22:06 +00:00
Stefan Wojcik
a7ca9950fc
potential fix for dereferencing nested lists
2013-06-11 15:36:35 -07:00
Ross Lawley
76fddd0db0
Merge branch 'master' into 0.8
...
Conflicts:
AUTHORS
mongoengine/base.py
tests/test_dereference.py
2013-04-18 13:30:00 +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
Daniil Sharou
cc0a2cbc6f
fix UnicodeEncodeError for dbref
...
Fix "UnicodeEncodeError: 'ascii' codec can't encode character ..." error in case dbref contains non-ascii characters
2013-04-16 22:34:33 +04:00
Daniil Sharou
add0b463f5
fix UnicodeEncodeError for dbref
...
Fix "UnicodeEncodeError: 'ascii' codec can't encode character ..." error in case dbref contains non-ascii characters
2013-04-16 21:12:57 +04:00
Ross Lawley
da7a8939df
Also check if a TopLevelMetaclass instance ( #261 )
2013-04-15 07:41:04 +00:00
Ross Lawley
eafbc7f20d
Merge remote-tracking branch 'origin/pr/261'
2013-04-15 07:31:02 +00:00
Paul Swartz
20cb0285f0
explicitly check for Document instances when dereferencing
...
In particular, `collections.namedtuple` instances also have a `_fields`
attribute which confuses the dereferencing.
2013-03-27 14:53:47 -04:00
Russ Weeks
41a698b442
Changed dereference.py to keep tuples as tuples
2013-03-12 10:28:29 -07: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
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
475488b9f2
Added support for distinct and db_alias ( MongoEngine/mongoengine#59 )
2012-08-07 10:04:05 +01:00
Ross Lawley
b0aa98edb4
Deref list custom id fix
2012-07-18 14:09:24 +01:00
Ross Lawley
7ca2ea0766
Fixes .save _delta issue with DBRefs
...
Fixes hmarr/mongoengine#518
2012-06-19 09:49:22 +01:00
Greg Banks
49a66ba81a
whoops, don't dereference all references as the first type encountered
2012-04-12 11:42:10 -07:00
Greg Banks
a1d43fecd9
fix for issue 473
2012-04-11 16:37:22 -07:00
Ross Lawley
398fd4a548
Merge branch 'cleaned_dev' of https://github.com/Ankhbayar/mongoengine into test
2012-02-29 11:13:48 +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
Анхбаяр Лхагвадорж
4a9ed5f2f2
Fix derefcence failed some case.
2012-02-02 18:33:12 +08: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
8d2bc444bb
db_alias using in model, queryset, reference fields, derefrence.
2011-12-07 01:16:36 -08:00
Ross Lawley
a8d91a56bf
Fixes circular list references
...
The depth deduciton for _fields was over zealous
now max_depth is honoured/
Fixes #373
2011-11-29 03:43:49 -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
Ross Lawley
823cf421fa
Fixes to circular references.
...
Removes infinite looping
refs #294
2011-09-29 14:07:30 -07:00
Wilson Júnior
331f8b8ae7
fixes dereference for documents (allow_inheritance = False)
2011-08-09 14:31:26 -03:00
Ross Lawley
84e611b91e
Tweak to dereferencing
2011-06-27 16:46:39 +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