之前写的一个关联删除的功能报错了,Log 中提示
Cause: com.mysql.jdbc.exceptions.jdbc4.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 ‘delete from baseface.ATT_USERPICTURE where STAFF_ID=’0f2cb73ba69c4bbbbb73ffe88e7’ at line 8
语句一看没毛病,怎会还会报错呢。查询了相关资料,MySQL 驱动默认没有开启批量执行 SQL 的开关,需要我们在配置文件中添加 allowMultiQueries 参数,设置为 true