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

fix(mongoose): make setDriver() update mongoose.model() connections and collections #14505

Merged
merged 3 commits into from Apr 7, 2024

Conversation

vkarpov15
Copy link
Collaborator

Summary

Right now calling setDriver() after mongoose.model() leaves models in an inconsistent state where they point to the old default connection and collections derived from the old default connection.

Examples

lib/model.js Outdated Show resolved Hide resolved
@vkarpov15 vkarpov15 added this to the 8.3.1 milestone Apr 7, 2024
@vkarpov15 vkarpov15 merged commit 7cf76cc into master Apr 7, 2024
34 checks passed
@vkarpov15 vkarpov15 deleted the vkarpov15/set-driver-model-db-2 branch April 7, 2024 21:34
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

Successfully merging this pull request may close these issues.

None yet

2 participants