-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
Make autoCreate
true by default
#8814
Comments
In documentation there is note that autoCreate is not supposed for production. Why it is written so? With mongoose 6 it will be ok for production? |
That's a good point. The reason why we're considering this change is for consistency with |
But what should I do then when I can have some absent collections which might be created within transactions in prod ( I have 4.2)? Isn't |
You would have to call |
I think if this is the only reason you don't recommend to have |
In that case I think you're fine to enable |
So documentation should mirror that case then and be not so strict on |
Change streams and transactions don't work unless the collection already exists, so it would be helpful if
autoCreate
was automatically set so you could just callModel.init()
.The text was updated successfully, but these errors were encountered: