mongoengine
mongoengine copied to clipboard
A Python Object-Document-Mapper for working with MongoDB
Hello, community. I recently upgraded the version of MongoEngine and Pymongo and I started having an issue while running my tests. I'm getting the error described in the title: `pymongo.errors.InvalidOperation:...
### Problem While MongoEngine has lovely schema validation, it only applies to changes that go through MongoEngine. Any changes made through pymongo or other access can easily bypass this validation...
I need to update the last item of a list field positional operator something like below ```py class Tag(EmbeddedDocument): name = StringField(required=True) description = StringField() class Blog(Document): tags = EmbeddedDocumentListField(Tag,...
Right now mongoengine only supports the retrieval of the first object from queryset. Need to add the retrieval of the latest object from the queryset to keep mongoengine orm closer...
In cases when we have a DictField and we have an EmbeddedDocument as a value of the dict, the values doesn't get _instance, thus not allowing us to reference parent...
mongoengine==0.24.2 pymongo[srv]==4.2.0 MongoDB 5.0 Persisting a document lacks fields defined in the Document class: ``` class MyDocument(Document): version = IntField(default=1) foo = StringField(required=True) bar = StringField(required=True) ``` Creating an instance...
Here is the class hierarchy: ``` class DataItem(EmbeddedDocument): key = StringField(required=True) value = StringField(required=True) class MyDoc(Document): data = MapField( field=EmbeddedDocumentField(DataItem) ) ``` And the data in db: ``` { "_id"...
 alignment issue in docs, the text coming out from the body
``` class BaseEvent(Document): type = IntField(required=True) source_id = IntField(required=True) meta = { 'allow_inheritance': True, 'collection': 'event', } class SimpleEvent(BaseEvent): start_time = DateTimeField(required=True) end_time = DateTimeField(required=True) meta = { 'allow_inheritance': True,...
Hello, While searching on the web, I have seen no mention for mongoengine support of current version of mongo UUID fields (binary subtype 0x04). When I use the following definition...