MyBatis、MySql、Java 的问题

以下是一个删除语句

@Delete("<script>" +
			"delete from es_orderline " +
			"where id in " +
			"<foreach collection='orderLines' item='orderLine' open='(' separator=',' close=')'>" +
			"#{orderLine.id }" +
			"</foreach>" +
			"</script>")
	void deleteOrderLineByCollection(@Param("orderLines") Collection<OrderLine> orderLines);

以下是报错

Caused by: 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 '' at line 1

按理来说 ’‘ 里应该会有错误语句,但我怎么改都咩有

你把你的 foreach里面的单引号 换成 \" 试试