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
added global id
option to disable id on schemas
#12067
Conversation
id
optionid
option to disable id on schemas
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great, thanks!
Can you add TS types+test to the PR as well?
Also, is there an option to set this on schema definition or only as a global option for now? It'd be nice if we can have an option to do that on the schema, but we can do it on a future PR.
could you explain what you mean with that? from what i can tell, this PR is about adding a global option for disabling the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also add id
to the TypeScript definitions for global Mongoose options here: https://github.com/Automattic/mongoose/blob/d742f4e71a026bc26acae0b4a797108af134f319/types/mongooseoptions.d.ts
@AbdelrahmanHafez you can already set this on the schema level. |
Thanks, I didn't know that. |
Co-authored-by: hasezoey <hasezoey@gmail.com>
style: fix lint from #12067
No description provided.