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

Handle multiple mongoose connections for service with schema and modelName #398

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

luuduchieu
Copy link

Currently, the adapter uses mongoose.connection for all database interactions. This approach becomes problematic when dealing with multiple databases, as it can lead to confusion and potential conflicts.

This PR handle for service with schema and modelName where it will spawn up new mongoose connection using createConnection. We will use "this.conn" on MongooseDbAdapter instead of "mongoose.connection".

@Freezystem
Copy link
Contributor

This PR conflicts with mine that add support for mongoose 7 and 8.
Unless I'm mistaken I think this case is handled in it.

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.

2 participants