Querydsl为同一桌的innerJoin

时间:2014-05-28 13:12:40

标签: spring hibernate jpql querydsl

此链接的SQL解决方案非常有趣.. Date difference between two records in same table

任何人都可以帮我构建相同查询的Querydsl .. ??

JPQLQuery query = new JPAQuery(entityManager);
query.from(XXXXX)

让我们假设我们有

QJobLogBean qjb = QJobLogBean.jobLogBean;

提前致谢。

1 个答案:

答案 0 :(得分:1)

您可以使用两个参数

QJobLogBean qjb1 = new QJobLogBean("qjb1");
QJobLogBean qjb2 = new QJobLogBean("qjb2");
JPQLQuery query = new JPAQuery(entityManager);
query.from(qjb1, qjb2)...