Has Hibernate 5 implemented DISCRIMINATOR approach for Multi-tenant data?
Asked Answered
J

3

9

According to hibernate 4 doc, the discriminator approach for multi-tenancy data was planned to be implemented on hibernate 5. However hibernate 5 doc is not up to date, it is still telling the same - 'Its support is planned for 5.0'.

So is it implemented or not? Any source telling more about it?

Jabber answered 10/12, 2015 at 16:43 Comment(0)
E
6

The HHH-6054 issue is still open, so Hibernate doesn't support this feature yet.

Eliseoelish answered 11/12, 2015 at 9:4 Comment(0)
O
1

Here are the docs referring to this. It is now available in Hibernate 6.

https://docs.jboss.org/hibernate/orm/6.0/userguide/html_single/Hibernate_User_Guide.html#multitenacy-hibernate-TenantId

Here is an example with Spring Boot

https://spring.io/blog/2022/07/31/how-to-integrate-hibernates-multitenant-feature-with-spring-data-jpa-in-a-spring-boot-application

Overpass answered 12/8, 2022 at 20:38 Comment(1)
A better link to docs (to @TenantId specifically): docs.jboss.org/hibernate/orm/6.0/userguide/html_single/…Kee
S
-1

The HHH-6054 issue is now resolved. The docs also don't mention that DISCRIMINATOR cannot be used.

Selfconceit answered 4/6, 2022 at 7:23 Comment(1)
The issue is resolved as "Out of date" and not fixed. There are reasons to not remove an enum member even if it's not used.Kee

© 2022 - 2024 — McMap. All rights reserved.