用bulkUpdate执行删除批量的数据是出错!

错误:
org.springframework.dao.InvalidDataAccessResourceUsageException: could not execute update query; nested exception is org.hibernate.exception.SQLGrammarException: could not execute update query

Caused by: org.hibernate.exception.SQLGrammarException: could not execute update query

Caused by: com.mysql.jdbc.exceptions.MySQLSyntaxErrorException:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'where enterprise_id=200826 and scheme_id='000000012'' at line 1
我把this.hibernateTemplate.bulkUpdate(hql);执行的删除操作
改为this.hibernateTemplate.delete(uid);
就ok了!

你可能感兴趣的:(DAO,Hibernate,mysql,SQL Server,Scheme)