CriteriaBuilder和多个连接条件

时间:2013-02-24 21:30:30

标签: java mysql

是否有可能在ON子句中添加更多连接条件?例如:

select * from table t left join second_table st ON t.id = st.id_second AND st.something = 2;

我的代码是:

CriteriaBuilder builder = em.getCriteriaBuilder();
Order o;
CriteriaQuery<Documentation> select = builder.createQuery(Documentation.class);
Root<Documentation> u = select.from(Documentation.class);
Join<Documentation, DocumentationUser> dul = u.join("documentationUserCollection", JoinType.LEFT);

0 个答案:

没有答案