Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

id as a unique field alongside _id #2819

Open
iebb opened this issue Jun 17, 2024 · 0 comments
Open

id as a unique field alongside _id #2819

iebb opened this issue Jun 17, 2024 · 0 comments

Comments

@iebb
Copy link

iebb commented Jun 17, 2024

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant