mongoengine icon indicating copy to clipboard operation
mongoengine copied to clipboard

`id` as a unique field alongside `_id`

Open iebb opened this issue 1 year ago • 0 comments

Migrating from Djongo here, and my current data involves - _id: the automatic ObjectId field id: Django-style integer field with a unique index.

As I want to maintain compatibility between Djongo model and MongoEngine, and since MongoEngine relies heavily on the 'id' field, what's the current best practice for MongoEngine to maintain both?

iebb avatar Jun 17 '24 14:06 iebb