JPA 2.0 Criteria Builder在where子句中使用Fetch?

时间:2015-09-15 14:38:32

标签: java hibernate jpa

我如何加入获取实体并在where子句中使用它。

 Fetch<Transaction,Customer> customer =transaction.fetch(Transaction_.customer,JoinType.LEFT);
 cq.where(cb.equal(customer.get(Customer_.name), "xxx"));

我收到以下错误: 对于类型Fetch

,方法get(SingularAttribute)未定义

有没有解决方法呢?

0 个答案:

没有答案
相关问题