hql子查询具有明显的

时间:2012-03-05 15:07:39

标签: java sql hibernate hql seam2

我有两个hql查询。它们如下:

String queryString = "select distinct le.id, count(cofl.id), " +
                                                "count(cofl.handOverDate), " +
                                                "count(cofl.dateCanceled), " +
                                                "le.dateDeleted " +
                         "from CustomerOrderLine cofl " +
                         "right join cofl.billingEntity.legalEntity le " +
                         "group by le.id, le.dateDeleted " +
                         "order by le.id";

String queryString2 = "select distinct le.id, count(quote.id), le.dateDeleted " +
                          "from Quote as quote " +
                          "right join quote.contractingLegalEntity le " +
                          "group by le.id, le.dateDeleted " +
                          "order by le.id";

我想将它们组合起来看看结果,如le.id,count(),count(),.....

任何人都知道如何结合这两个查询? (ps。我尝试将它们中的任何一个用作子查询,但没有成功。)

提前致谢

0 个答案:

没有答案