Multitenancy query result error - query cache key (bug ?)


stephane <passignat@...>
 

Hi,

When 2 queries with the same tenant but different tenantReaders are executed, the second one returns the result of the first one.

The SQL generated is the same for the second query while it should be different.

The query cache key only uses the tenant which may explain the case.
String multiTenancyId = ec.getNucleusContext().getMultiTenancyId(ec);
if (multiTenancyId != null)
{
queryCacheKey += (" " + multiTenancyId);
}
(no test case yet)

--
Stephane