Hibernate 4.1.1 Layered approach to the current point identifier Resolver, any example

Sleep mode 4.1.1. Multiuser method CurrentTenantIdentifierResolver, any example. My concern is how the sleeping cache will be updated when the circuit / tenant switches.

Any help would be appreciated.

+4
source share
1 answer

According to Hibernate, layered documentation :

16.3.3. Caching

Support for multi-user support in Hibernate works with Hibernate's second-level cache. The key used to cache the data encodes the tenant ID.

This basically means that instead of Hibernate using the UID of the object, it uses the identifier returned by CurrentTenantIdentifierResolver.resolveCurrentTenantIdentifier() plus the identifier of the object. This means that each object in the cache is unique to its scheme.

+4
source

All Articles