【发布时间】:2012-02-15 22:01:37
【问题描述】:
我是新手,请让我知道我做错了什么。谢谢。
我花了几个小时寻找解决方案,但找不到任何解决方案。
假设我有 2 个这样的表:
TableOne
column1(PK) column2(PK) column3 column4
A 1 10
A 2 9
TableTwo
column5(PK) column6 column7 column8
A
是否有任何休眠标准相当于:
select * from tableone t1, tableone t11,
(select column1, count(*) as COUNT from tabletwo group by column1) t2
where t1.column1 = t11.column1
and t1.column2 = 1
and t11.column2 = 2
and t11.column3 = t2.COUNT
and t11.column1 = t2.column1;
谢谢大家!
【问题讨论】:
标签: java hibernate join subquery criteria