尝试像这样编写HQL查询
String hql = "from Table1 t1 where (t1.field1, t1.field2) in ( select distinct t2.field3, t2.field4 from Table2 t2 where t2.id=12345)";sessionFactory.getCurrentSession().createQuery(hql).list()

尝试像这样编写HQL查询
String hql = "from Table1 t1 where (t1.field1, t1.field2) in ( select distinct t2.field3, t2.field4 from Table2 t2 where t2.id=12345)";sessionFactory.getCurrentSession().createQuery(hql).list()