我需要获取one-to-many
与 Hibernate 标准关系的最后一条记录和主要记录。Pseudo-Sql 显示我要执行的查询
表 1(主) 表
2(详细)
Select *
from Table1 tab1, Table2 tab2
where tab2.tab1id == tab1.id
and tab2.date == ( select Max(date)
from table2 where table2.tab1id == tab1.id)