Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Partitioned Multitenancy in Hibernate how to make it work

I’ve encountered a peculiar issue with Hibernate, specifically related to partitioned multitenancy using the @TenantId annotation. The multitenancy feature seems not to work when directly fetching objects using findById (it works in other cases).

Does the multitenancy work differently when trying to get records by id? I’m really confused and spent so much time on this.

If anyone has insights or a workaround for this, your help would be greatly appreciated.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

There is an existing bug in Hibernate 6.2. It seems like it could be the reason why it doesnt work for you:

https://hibernate.atlassian.net/browse/HHH-16835

It is marked as resolved but actually the bug is still there (https://hibernate.atlassian.net/browse/HHH-16830 https://hibernate.atlassian.net/browse/HHH-14968)

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading