-
Bug
-
Resolution: Done
-
Major
-
EAP 5.0.0.CR5, EAP 5.0.1.CR2, EAP 5.0.1, EAP_EWP 5.1.0
-
None
-
Release Notes
-
-
Documented as Resolved Issue
Typically following code will raise a CCE
Criteria crit = session.createCriteria(MyEntity.class);
crit.setProjection( Projections.projectionList()
.add( Projections.alias(Projections.property("description"), "description" ))
.add( Projections.alias(Projections.property("id"), "id" ))
);
crit.setCacheable(true);
crit.setResultTransformer(Transformers.aliasToBean(MyEntity.class));
List results = crit.list();
java.lang.ClassCastException: org.hibernate.test.case756453.MyEntity
at org.hibernate.cache.StandardQueryCache.put(StandardQueryCache.java:106)
at org.hibernate.loader.Loader.putResultInQueryCache(Loader.java:2208)
at org.hibernate.loader.Loader.listUsingQueryCache(Loader.java:2159)
at org.hibernate.loader.Loader.list(Loader.java:2117)
at org.hibernate.loader.criteria.CriteriaLoader.list(CriteriaLoader.java:118)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1596)
at org.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:306)
There is a problem between the real cached value and the expected cached value (maybe the transformer is applied too soon or query cache is not aware the cached value is already transformed,...).
http://opensource.atlassian.com/projects/hibernate/browse/HHH-5163
- blocks
-
JBPAPP-4320 upgrade hibernate components for EPA 5.1
- Closed