Uploaded image for project: 'Hibernate ORM'
  1. HHH-3694

ResultTransformer not used when scroll() is used on a named SQLQuery

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects versions: 3.3.1
    • Fix versions: 3.5.4, 3.6.0.Beta1
    • Components: None
    • Labels:
      None
    • Environment:
      Hibernate Core 3.3.1, PostgreSQL 8.1, HSQLDB 1.8
    • Bug Testcase Reminder (view):

      Bug reports should generally be accompanied by a test case!

    • Last commented by a user?:
      true
    • Sprint:

      Description

      If a ResultTransformer is set on a named SQLQuery, and then scroll() is used on the query, the ResultTransformer is never used. The unit test in the attached Maven project shows this.

      The fix seems simple - a one-line change in org.hibernate.loader.custom.CustomLoader#getHolderInstantiator(ResultTransformer resultTransformer, String[] queryReturnAliases). The sense of the test of resultTransformer against null should be reversed.

        Attachments

          Activity

            People

            • Votes:
              3 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: