sql语句怎么转hql语句
String sql=“UPDATE
tb_employee AS S1
JOIN tb_employee AS S2 ON
(S1.employeeID = 1 AND S2.employeeID = 4)
SET
S1.seatID = S2.seatID,
S2.seatID = S1.seatID,
S1.departmentID = S2.departmentID,
S2.departmentID = S1.departmentID;“
departmentDao.update(sql, null);
update的方法
@Autowired
protected HibernateTemplate template;
public HibernateTemplate getTemplate() {
return template;
}
public void update(final String hql, final Object[] params){
getTemplate().bulkUpdate(hql, params);
}
HQL语句怎么写啊(我用SQL语句报错)