mongoengine icon indicating copy to clipboard operation
mongoengine copied to clipboard

A Python Object-Document-Mapper for working with MongoDB

Results 178 mongoengine issues
Sort by recently updated
recently updated
newest added

Currently, if you set a ListField to an empty list, it unset it in the database instead of storing an empty list. This is bad because it creates inconsistencies which...

I try to repeat this: ``` python In [1]: from mongoengine import * In [2]: class TestData(DynamicDocument): pass In [3]: td = TestData() In [4]: td.mydata = [{'name':'bob','sdata':[]}] In [5]:...

Bug
ListField

``` python import mongoengine class TestDoc(mongoengine.Document): list_field = mongoengine.ListField() mongoengine.connect('test') test_doc = TestDoc.objects.create() ``` After this operation, in spite of the fact that list_field was not given any value, the...

Bug
Discussion
ListField

Using a regex causes _TypeError: cannot deepcopy this pattern object_. here is a sample code: ``` python from mongoengine.connection import register_connection, DEFAULT_CONNECTION_NAME from mongoengine import Document, StringField from mongoengine.queryset import...

Awaiting Response

On Mongoengine 0.20.0 and mongodb 4.4.0 Im doing a fairly involved query setting up a couple of Qs (and/or-ing) , some of them using "startswith" operation that translates into the...

When querying a `MapField` or `DictField` the order of the keys & values matter. After digging into the MongoDB documentation I understood that this has to do with the fact...

Seems like batch updating with document.update(**kwargs) only affects DB, not current document. Here is an example: ``` python from mongoengine import * connect("test") class SomeDocument(Document): title = StringField() def __unicode__(self):...

Enhancement
Discussion

`test_no_dereference_context_manager_object_id`: https://github.com/MongoEngine/mongoengine/blob/96802599045432274481b4ed9fcc4fad4ce5f89b/tests/test_context_managers.py#L119-L154 run this test: ```sh pytest tests/test_context_managers.py -k "test_no_dereference_context_manager_object_id" ``` we got no error, but if I put the `assert False` in `with no_dereference(Group) as Group:`: ```py user =...

Hi, I'm facing the following situation: ### I have two classes: 1:`EmbeddedDocument ` and the other is a 2: `Document` Inside of the document I'm using a variable called `products`...

When converting a QuerySet with an `only()` or `exclude()` field to json, the required fields returned in each object are the required ones from the query. ```python output = Example.objects.only('field_1').to_json()...