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

Disable Query parameter validation when a Session is unwrapped from an EntityManager

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 5.2.9
    • Fix Version/s: 5.2.10
    • Component/s: hibernate-core
    • Labels:
      None
    • Bug Testcase Reminder (view):

      Bug reports should generally be accompanied by a test case!

    • Worked in:
    • Last commented by a user?:
      true

      Description

      The "Query parameter binding validation" introduced in HHH-11397 (commit 55af30e) is too strict when using a org.hibernate.usertype.UserType.

      The query parameter value is always compared with the return value of the UserType's returnedClass() method.

      In our UserType's nullSafeSet method, we accept instances of the UserType's returnedClass() method as value, as well as other values (which worked in Hibernate 5.2.8 and leads to an IllegalArgumentException in Hibernate 5.2.9).

      Test case: see qpvalidation.zip.

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: