Skip to content

is createCollection in mongoose idempotent? #15462

Answered by vkarpov15
kasir-barati asked this question in Q&A
Discussion options

You must be logged in to vote

createCollection() is idempotent. Mongoose does send createCollection() on mongoose.connect() for all models by default, you can disable that with mongoose.set('autoCreate', false).

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@kasir-barati
Comment options

@vkarpov15
Comment options

Answer selected by kasir-barati
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants