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

Allow dereferencing map key through Criteria API

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects versions: 5.2.8
    • Fix versions: None
    • Components: hibernate-core
    • Labels:
      None
    • Bug Testcase Reminder (view):

      Bug reports should generally be accompanied by a test case!

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

      Description

      Trying to dereference a map-key path throws a Not yet supported! exception:

      This:

      CriteriaBuilder cb = entityManager.getCriteriaBuilder();
      CriteriaQuery<Long> cq = cb.createQuery(Long.class);
      Root<Foo> from = cq.from(Foo.class);
      MapJoin<Foo, Bar, Long> joinMap = from.joinMap("map");
      Path<Bar> key = joinMap.key();
      Path<Long> id = key.get("id");
      cq.select(id);
      entityManager.createQuery(cq).getResultList();
      

      fails at key.get("id") with java.lang.UnsupportedOperationException: Not yet supported!.

      HHH-10577 Closed fixed this for JPQL, but not for the Criteria API.

        Attachments

          Issue links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                heruan Giovanni Lovato
                Participants:
              • Votes:
                1 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated: