PropertyAccessException when caching results from a Query with a ResultTransformer that as 1 value per row

Description

PropertyAccessException is thrown when all of the following are true:

  • Query has a ResultTransformer

  • results are cached before being transformed

  • each result has a single value

This is reproduced by:

  • HqlQueryCachePutResultTransformerTest.testOneSelectNewListFailureExpected(), which has:
    s.createQuery( "select new org.hibernate.test.querycache.StudentDTO(s.name) from Student s order by st.studentNumber" );

  • HqlQueryCachePutResultTransformerTesttestAliasToBeanDtoOneArgListFailureExpected(), which has:
    s.createQuery( "select st.name as studentName from Student st order by st.studentNumber" )
    .setResultTransformer( Transformers.aliasToBean( StudentDTO.class ) );

Activity

Steve EbersoleMarch 21, 2011 at 7:09 PM

Bulk closing stale resolved issues

Former userJuly 30, 2010 at 5:41 AM

Fixed in trunk and Branch_3_5.

Fixed

Details

Assignee

Reporter

Fix versions

Affects versions

Priority

Created July 30, 2010 at 4:54 AM
Updated April 22, 2015 at 6:40 PM
Resolved July 30, 2010 at 5:41 AM