add cache condition to prevent null cache value of tenant (#398)
Signed-off-by: Michael Hirsch <michael.hirsch@bosch-si.com>
This commit is contained in:
committed by
Kai Zimmermann
parent
eb9fd0fea7
commit
9e28fcfbb9
@@ -244,7 +244,7 @@ public class JpaSystemManagement implements CurrentTenantCacheKeyGenerator, Syst
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Cacheable(value = "currentTenant", keyGenerator = "currentTenantKeyGenerator", cacheManager = "directCacheManager")
|
@Cacheable(value = "currentTenant", keyGenerator = "currentTenantKeyGenerator", cacheManager = "directCacheManager", unless = "#result == null")
|
||||||
// set transaction to not supported, due we call this in
|
// set transaction to not supported, due we call this in
|
||||||
// BaseEntity#prePersist methods
|
// BaseEntity#prePersist methods
|
||||||
// and it seems that JPA committing the transaction when executing this
|
// and it seems that JPA committing the transaction when executing this
|
||||||
|
|||||||
Reference in New Issue
Block a user