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

Unable to use String field name for criteria query when joining an embedded object

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Out of Date
    • Affects versions: 4.3.5
    • Fix versions: None
    • Components: query-criteria
    • Bug Testcase Reminder (view):

      Bug reports should generally be accompanied by a test case!

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

      Description

      This appears to be a variant of the issue reported as HHH-5792 Closed . I updated the test case for that issue to test for the case where the criteria query uses strings rather than the metamodel. The testcase demonstrates that the criteria queries work correctly when using the metamodel but fail when using string property names.

      The unit test fails with the exception:

      java.lang.ClassCastException: org.hibernate.jpa.internal.metamodel.SingularAttributeImpl cannot be cast to javax.persistence.metamodel.ManagedType

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: