-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Adding multi-tenancy support to MongoDb Panache throught dynamic database selection #29192
Closed
pedroh-pereira
wants to merge
0
commits into
quarkusio:main
from
pedroh-pereira:feat/#14789-adding-panache-database-resolver
Closed
Adding multi-tenancy support to MongoDb Panache throught dynamic database selection #29192
pedroh-pereira
wants to merge
0
commits into
quarkusio:main
from
pedroh-pereira:feat/#14789-adding-panache-database-resolver
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pedroh-pereira
force-pushed
the
feat/#14789-adding-panache-database-resolver
branch
4 times, most recently
from
November 14, 2022 13:07
4e5393e
to
5592f19
Compare
evanchooly
reviewed
Nov 14, 2022
...rc/main/java/io/quarkus/mongodb/panache/common/reactive/runtime/ReactiveMongoOperations.java
Outdated
Show resolved
Hide resolved
...ongodb-panache/src/test/java/io/quarkus/it/mongodb/panache/ResolversPropertiesConstants.java
Outdated
Show resolved
Hide resolved
...e/src/test/java/io/quarkus/it/mongodb/panache/profiles/MongoDatabaseResolverTestProfile.java
Outdated
Show resolved
Hide resolved
...he-common/runtime/src/main/java/io/quarkus/mongodb/panache/common/MongoDatabaseResolver.java
Outdated
Show resolved
Hide resolved
...anache-common/runtime/src/main/java/io/quarkus/mongodb/panache/common/runtime/BeanUtils.java
Outdated
Show resolved
Hide resolved
...anache/src/test/java/io/quarkus/it/mongodb/panache/resolvers/ResolverEntityWithDatabase.java
Outdated
Show resolved
Hide resolved
pedroh-pereira
added a commit
to pedroh-pereira/quarkus
that referenced
this pull request
Nov 14, 2022
- Removing unused import from BeanUtils - Removing unnecessary nested class from ResolverEntityWithDatabase - Removing unused ResolversPropertiesConstants - Removing the method BeanUtils.getValueFromArcInstance, so BeanUtils.getDatabaseNameFromResolver will get the information directly
pedroh-pereira
force-pushed
the
feat/#14789-adding-panache-database-resolver
branch
from
November 14, 2022 19:28
5c24466
to
0977a71
Compare
quarkus-bot
bot
added
area/arc
Issue related to ARC (dependency injection)
area/cli
Related to quarkus cli (not maven/gradle/etc.)
area/core
area/dependencies
Pull requests that update a dependency file
area/devtools
Issues/PR related to maven, gradle, platform and cli tooling/plugins
area/documentation
area/gradle
Gradle
area/infra-automation
anything related to CI, bots, etc. that are used to automated our infrastructure
area/jakarta
area/jbang
Issues related to when using jbang.dev with Quarkus
area/kafka
area/kubernetes
area/logging
area/maven
area/oidc
area/platform
Issues related to definition and interaction with Quarkus Platform
area/qute
The template engine
labels
Nov 14, 2022
pedroh-pereira
force-pushed
the
feat/#14789-adding-panache-database-resolver
branch
from
November 21, 2022 17:58
46f566c
to
6643132
Compare
This comment has been minimized.
This comment has been minimized.
pedroh-pereira
requested review from
loicmathieu and
gsmet
and removed request for
gsmet and
loicmathieu
November 21, 2022 19:26
pedroh-pereira
changed the title
Adding MongoDatabaseResolver to be used in a multi-tenancy environment
Adding multi-tenancy support to MongoDb Panache throught dynamic database selection
Nov 21, 2022
|
pedroh-pereira
force-pushed
the
feat/#14789-adding-panache-database-resolver
branch
6 times, most recently
from
November 29, 2022 02:40
8d6c731
to
934c602
Compare
pedroh-pereira
requested review from
evanchooly
and removed request for
loicmathieu
November 29, 2022 02:40
pedroh-pereira
force-pushed
the
feat/#14789-adding-panache-database-resolver
branch
from
November 29, 2022 13:42
934c602
to
aa1741c
Compare
pedroh-pereira
requested review from
gsmet and
loicmathieu
and removed request for
evanchooly and
gsmet
November 29, 2022 13:48
pedroh-pereira
force-pushed
the
feat/#14789-adding-panache-database-resolver
branch
from
December 1, 2022 19:29
aa1741c
to
7e90ca3
Compare
pedroh-pereira
force-pushed
the
feat/#14789-adding-panache-database-resolver
branch
from
December 4, 2022 14:59
7e90ca3
to
dd9eebe
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Based on #14789
It consists in a interface called MongoDatabaseResolver that can be implemented to get the database name to be used on mongo operations execution
So if I have a MongoDatabaseResolver implementation the database to be used in the current mongo operation will be the return of resolve() method, but the resolver will be successful only for the entities that doesn't specify the database through the @MongoEntity(database="")
Disclaimer:
After this PR be approved I can help to provide a detailed documentation
@loicmathieu @evanchooly