//清除重复列
Session session = entityManager.unwrap(org.hibernate.Session.class);
String strSql= "from AppStrategyEntity y where (y.gName,y.strategy_id)in(select x.gName,max(x.strategy_id)from AppStrategyEntity x group by x.gName)";
//Query query = session.createQuery(strSql.toString());
org.hibernate.Query query = session.createQuery(strSql.toString());
return query.list();
JPA 去除重复列数据
最新推荐文章于 2023-08-29 09:58:17 发布