Uploaded image for project: 'JBoss Enterprise Application Platform 4 and 5'
  1. JBoss Enterprise Application Platform 4 and 5
  2. JBPAPP-4175 HHH-5163 Bug when applying a ResultTransformer on a cacheable projection based criteria
  3. JBPAPP-5481

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

    XMLWordPrintable

    Details

    • Release Notes Text:
      Hide
      When Hibernate executed a cacheable query using a <classname>ResultTransformer</classname>, it attempted to cache the results. However, the data had the potential to be modified so that Hibernate could not read it.

      PropertyAccessException was thrown when all of the following are true:

      * The query has a ResultTransformer
      * Results are cached before being transformed
      * Each result has a single value

      This issue is fixed by introducing three new API calls:
      org.hibernate.transform.AliasedTupleSubsetResultTransformer
      org.hibernate.transform.CacheableResultTransformer
      org.hibernate.transform.TupleSubsetResultTransformer.

      Refer to the Hibernate Javadoc for more details.
      Show
      When Hibernate executed a cacheable query using a <classname>ResultTransformer</classname>, it attempted to cache the results. However, the data had the potential to be modified so that Hibernate could not read it. PropertyAccessException was thrown when all of the following are true: * The query has a ResultTransformer * Results are cached before being transformed * Each result has a single value This issue is fixed by introducing three new API calls: org.hibernate.transform.AliasedTupleSubsetResultTransformer org.hibernate.transform.CacheableResultTransformer org.hibernate.transform.TupleSubsetResultTransformer. Refer to the Hibernate Javadoc for more details.
    • Release Notes Docs Status:
      Documented as Resolved Issue

      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 ) );

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                stliu Strong Liu
                Reporter:
                stliu Strong Liu
                Writer:
                Misty Stanley-Jones
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: