We're updating the issue view to help you get more done. 

Allow dereferencing map key through Criteria API

Description

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

This:

1 2 3 4 5 6 7 8 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!.

fixed this for JPQL, but not for the Criteria API.

Environment

None

Status

Assignee

Unassigned

Reporter

Giovanni Lovato

Fix versions

None

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Affects versions

5.2.8

Priority

Major