I am using the latest available version of django-mongodb-backend 5.1.0b1, and my data contains quite a few lists with objetcs in there. So it means I cannot use EmbeddedModelField, I need to use ArrayField with base_field=models.JSONField
I get json dump errors id these inner objects have something python json cannot serialize (ObjectIds but also datetimes)
This is in django_mongodb_backend.operations.DatabaseOperations.convert_jsonfield_value
on line 150.
This call uses a plain json.dumps and we cannot give it an encoder.
How come all these bson fields are not handled in there?
My embedded documents load fine if they are in EmbeddedModelField but the document says I cannot use that in ArrayField.
Anyone has faced the same problem? Any advised solution? It’s quite deep in the code, somewhere I cannot simply override.