Details
Description
Here is the failing test demonstrating the problem. query "Having" part must be included in the cache key , just like all the other parts.
SelectQuery<Artist> q1 = new SelectQuery<>(Artist.class); q1.setCacheStrategy(QueryCacheStrategy.LOCAL_CACHE); q1.setHavingQualifier(ExpressionFactory.expFalse()); SelectQuery<Artist> q3 = new SelectQuery<>(Artist.class); q3.setCacheStrategy(QueryCacheStrategy.LOCAL_CACHE); q3.setHavingQualifier(ExpressionFactory.expTrue()); assertNotEquals( q1.getMetaData(resolver).getCacheKey(), q3.getMetaData(resolver).getCacheKey());