请问在hibernate怎么执行如下语句?
String sql = "DELETE FROM item WHERE (i_id <> (SELECT MIN(i_id) AS i_id "
+ "FROM item t1 WHERE item.i_link = t1.i_link)) ";
请问在hibernate3怎么执行如下语句?没有分了,请见谅
------解决方案--------------------sf
------解决方案--------------------是session.createSQLQuery(sql)吗
------解决方案--------------------Session session=(SessionFactoryImpl)factory).openSession();
PreparedStatement pstmt=((SessionImpl)session).getBatcher().prepareStatement(sql);
pstmt.execute();