JPA Criteria API: LEFT JOIN for optional relationships

前端 未结 2 608
滥情空心
滥情空心 2021-02-13 22:13

I\'m using the Criteria API basically the first time. It\'s about abstracting queries for a generic builder:

public TypedQuery newQuery( Manager

        
2条回答
  •  面向向阳花
    2021-02-13 22:31

    I had the same issue... After investigation the conclusion is That you hâve to handle this with left join in your jpql See that: http://www.objectdb.com/java/jpa/query/jpql/path#Navigation_through_a_NULL_value_

提交回复
热议问题