Skip to content

Multitenancy without CurrentTenantIdentifierResolver #765

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

Merged
merged 2 commits into from
May 19, 2021

Conversation

DavideD
Copy link
Member

@DavideD DavideD commented May 18, 2021

Fixes #764

@gavinking shouldn't also be possible for a user to set the tenant for the stateless session?

@DavideD DavideD force-pushed the 764-Multitenancy branch from 782d157 to b4a5c57 Compare May 18, 2021 16:31
@gavinking
Copy link
Member

Huh, I don't get it: why to SessionFactorys have tenant ids? That doesn't seem to make sense.

shouldn't also be possible for a user to set the tenant for the stateless session?

Sure, it's easy to add.

@DavideD
Copy link
Member Author

DavideD commented May 18, 2021

I think it's because ORM uses the following approach for the creation of the session with a tenant:

ormFactory.withOptions().tenantIdentifier( "tenantId" ).openSession()

@gavinking
Copy link
Member

Oh, I see, Ok, fine.

@DavideD DavideD changed the title Multitenancy withou CurrentTenantIdentifierResolver Multitenancy without CurrentTenantIdentifierResolver May 18, 2021
@DavideD DavideD merged commit 77d9748 into hibernate:main May 19, 2021
@DavideD DavideD deleted the 764-Multitenancy branch June 2, 2021 17:06
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.

Multitenancy fails without CurrentTenantIdentifierResolver
2 participants