cuba-platform/cuba

No value was provided for the session property [tenantId].

panevin-di opened this issue · 0 comments

Case 1:

Copy of jmix-projects/jmix-data#105.

CUBA 7.2.16. Using multitenancy addon with entity cache produces error.

QueryException: Exception Description: No value was provided for the session property [tenantId]. This exception is possible when using additional criteria or tenant discriminator columns without specifying the associated contextual property. These properties must be set through EntityManager, EntityManagerFactory or persistence unit properties. If using native EclipseLink, these properties should be set directly on the session.

Continue of #3241.

After upgrading 7.2.15 to 7.2.16 still keeps appearing from time to time, especially on commit operations.
stacktrace (2).txt

To reproduce the error, we can give access to the project and I will provide exact reproducing steps.

Case 2:

See com.haulmont.cuba.core.sys.entitycache.QueryKey: keys are not distinguished by additional criteria parameters (such as "tenantId"), but results should by different for different "tenantId"-s.

QueryKey should be improved.