Ensure that queries are segregated from entities/collections if they use the same region name
git-svn-id: https://svn.jboss.org/repos/hibernate/core/trunk@14350 1b8cb986-b30d-0410-93ca-fae66ebed9b2
This commit is contained in:
parent
4779620061
commit
e42ebe816f
|
@ -43,7 +43,7 @@ import org.jboss.cache.config.Option;
|
|||
public class QueryResultsRegionImpl extends TransactionalDataRegionAdapter implements QueryResultsRegion {
|
||||
|
||||
public static final String QUERY_CACHE_LOCAL_ONLY_PROP = "hibernate.cache.region.jbc2.query.localonly";
|
||||
|
||||
public static final String TYPE = "QUERY";
|
||||
|
||||
/**
|
||||
* Whether we should set an option to disable propagation of changes around
|
||||
|
@ -134,7 +134,7 @@ public class QueryResultsRegionImpl extends TransactionalDataRegionAdapter imple
|
|||
|
||||
@Override
|
||||
protected Fqn<String> createRegionFqn(String regionName, String regionPrefix) {
|
||||
return Fqn.fromString(escapeRegionName(regionName, regionPrefix));
|
||||
return getTypeLastRegionFqn(regionName, regionPrefix, TYPE);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -36,6 +36,7 @@ import org.hibernate.cache.StandardQueryCache;
|
|||
import org.hibernate.cache.jbc2.BasicRegionAdapter;
|
||||
import org.hibernate.cache.jbc2.CacheInstanceManager;
|
||||
import org.hibernate.cache.jbc2.JBossCacheRegionFactory;
|
||||
import org.hibernate.cache.jbc2.query.QueryResultsRegionImpl;
|
||||
import org.hibernate.cfg.Configuration;
|
||||
import org.hibernate.test.cache.jbc2.AbstractGeneralDataRegionTestCase;
|
||||
import org.hibernate.test.util.CacheTestUtil;
|
||||
|
@ -83,7 +84,7 @@ public class QueryRegionImplTestCase extends AbstractGeneralDataRegionTestCase {
|
|||
|
||||
@Override
|
||||
protected Fqn getRegionFqn(String regionName, String regionPrefix) {
|
||||
return Fqn.fromString(BasicRegionAdapter.escapeRegionName(regionName, regionPrefix));
|
||||
return BasicRegionAdapter.getTypeLastRegionFqn(regionName, regionPrefix, QueryResultsRegionImpl.TYPE);
|
||||
}
|
||||
|
||||
public void testPutDoesNotBlockGetOptimistic() throws Exception {
|
||||
|
|
Loading…
Reference in New Issue