JPA 2 Criteria Fetch Path Navigation

前端 未结 6 666
我寻月下人不归
我寻月下人不归 2020-12-08 14:38

With JPA 2 Criteria Join method I can do the following:

    //Join Example (default inner join)
    int age = 25;
    CriteriaBuilder cb = entityManager.getC         


        
6条回答
  •  抹茶落季
    2020-12-08 15:08

    I am using JPA 2.1 with Hibernate 4.3.7 and the below works for me well. It does not even look that ugly.

    Join p = (Join) t.fetch(Team_.players);
    

提交回复
热议问题