I am trying to update multiple database rows. Using mybatis 3.1
and spring 3
here is my update query in mapper.xml
:
<update id="updateEmployeeTrips" parameterType="com.xxx.xxx.EmployeeTrip">
<foreach collection="list" item="employeeTrips" index="index" separator=";">
update employee_trips set pickup_drop_time = #{employeeTrips.pickupTime} where id = #{employeeTrips.id}
</foreach>
</update>
Giving the error:
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 'update employee_trips set pickup_drop_time = '01:35:00' where id = 10' at line 3