You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#15449 added the methods setMultiTenantConnectionProvider and setCurrentTenantIdentifierResolver methods to LocalSessionFactoryBean in org.springframework.orm.hibernate4
In org.springframework.orm.hibernate5.LocalSessionFactoryBean only the setCurrentTenantIdentifierResolver exists, and it doesn't appear t be working.
The reason is simply that, for whatever reason, Hibernate 5 does provide an explicit setCurrentTenantIdentifierResolver method on its Configuration class but not a corresponding setMultiTenantConnectionProvider. I'll see what we can do here, possibly using the properties-based approach along the lines of what we do for Hibernate 4... just for this particular setting.
I've introduced this for Spring Framework 4.3 now, as a setMultiTenantConnectionProvider method on both LocalSessionFactoryBuilder and LocalSessionFactoryBean. Since those classes have been reworked for 4.3 already, let's consider this feature as 4.3+ as well. After all, it drags a rather involved new Hibernate SPI dependency into those classes which might cause side effects.
Menachem Rath opened SPR-14072 and commented
#15449 added the methods setMultiTenantConnectionProvider and setCurrentTenantIdentifierResolver methods to LocalSessionFactoryBean in org.springframework.orm.hibernate4
In org.springframework.orm.hibernate5.LocalSessionFactoryBean only the setCurrentTenantIdentifierResolver exists, and it doesn't appear t be working.
Looking at the Hibernate documentation for:
I don't see a difference in the behavior of multi tenant.
Affects: 4.2.5
Reference URL: http://docs.jboss.org/hibernate/orm/5.1/userguide/html_single/Hibernate_User_Guide.html#_multitenantconnectionprovider
Issue Links:
Referenced from: commits 5f64064
The text was updated successfully, but these errors were encountered: