MyBatis Batch Insert/Update For Oracle

后端 未结 3 1120
日久生厌
日久生厌 2020-11-29 00:40

I\'ve recently started learning to use myBatis.I am now facing such a scenario, I need to constantly fetch a new list of Objects through WebService, then for this list, I ne

3条回答
  •  悲哀的现实
    2020-11-29 01:35

    In oracle if you want to execute multiple statements at one time you have to enclose your statements in "begin" and "end" block. So try to add attributes to foreach as below. This will definitely work.

    
    
        UPDATE customer SET isActive = #{object.isactive}
        WHERE  customerId= #{object.customerId}
    
    

提交回复
热议问题