Hibernate ORM
  1. Hibernate ORM
  2. HHH-8478

AttributeConverters need to be applied to JPQL and Criteria queries

    Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.3.0.Beta5
    • Component/s: entity-manager
    • Labels:
    • Last commented by a user?:
      true

      Description

      From section 3.8 of the JPA spec:

      The persistence provider must apply any conversion methods to instances of attribute values in path expressions used within Java Persistence query language queries or criteria queries (such as in comparisons, bulk updates, etc.) before sending them to the database for the query execution. When such converted attributes are used in comparison operations with literals or parameters, the value of the literal or parameter to which they are compared must also be converted.

        Issue Links

          Activity

          Hide
          Steve Ebersole added a comment -

          In standalone TCK see com/sun/ts/tests/jpa/core/convert/Client.java#convert3Test_from_standalone

          Show
          Steve Ebersole added a comment - In standalone TCK see com/sun/ts/tests/jpa/core/convert/Client.java#convert3Test_from_standalone
          Hide
          Steve Ebersole added a comment -

          In the parameter case, we should already be covered since the Type will be used to bind the parameter value and that Type has the AttributeConverter encoded into it.

          In the literal case, we have 2 options. First, we could convert it to a parameter or we could convert the literal value "in place".

          Show
          Steve Ebersole added a comment - In the parameter case, we should already be covered since the Type will be used to bind the parameter value and that Type has the AttributeConverter encoded into it. In the literal case, we have 2 options. First, we could convert it to a parameter or we could convert the literal value "in place".

            People

            • Assignee:
              Steve Ebersole
              Reporter:
              Steve Ebersole
              Participants:
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - Not Specified
                Not Specified
                Logged:
                Time Spent - 4h 55m
                4h 55m

                  Development