2013-10-26 44 views
0

首先關閉所有,對不起我的英語。JPA加入條件

我想創建一個JPA的查詢,這樣

select * 
from table1 t1 
inner join table2 t2 on t1.id = t2.id 
    and t2.field = 1 

怎麼辦裏面join的 「and t2.field = 1」(不WHERE條款)提前

感謝。

回答

0

JPQL不支持。 HQL(Hibernate JPQL實現)有一個with關鍵字。