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


stephane
 

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

Join main@datanucleus.groups.io to automatically receive all group messages.