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

[Docs]: Add Section for Multi DB Setup #73

Merged

Conversation

johannesschobel
Copy link
Contributor

Dear @doug-martin ,

this PR adds a section to the docs, describing how to use this package with a multi db setup.
All the best

Copy link
Owner

@doug-martin doug-martin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great addition!

}
```

Next, you may want to create a custom `SecretDatabaseService` responsible for the database access. This is your specific [TypeOrmQueryService](./usage.md). Note that you now need to pass an additional argument to the `@InjectRepository()` decorator that indicates the `Connection` you are using. This string has to match the `name` property in the `TypeOrmModule` options!
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does @InjectTypeOrmQueryService also work? Reading these it makes it seem like that wont work.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmmmmmmmm.. that is actually a good question - i have not tested this.. it works, however, with the @NestJsTypeOrmModule.forFeature(...) in the @Module() declaration.

I can try to use the @TypeOrmQueryService() in my own application.

@doug-martin doug-martin changed the base branch from master to v0.7.5-rc April 3, 2020 02:46
@doug-martin doug-martin merged commit c225369 into doug-martin:v0.7.5-rc Apr 3, 2020
@johannesschobel
Copy link
Contributor Author

You are welcome.. thought i will document how to use this feature with your library!
I will submit further PRs for the docs, if i stumble upon things that are not quite clear..

@johannesschobel johannesschobel deleted the docs/multiple-connections branch April 3, 2020 07:09
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