Home >Database >Mysql Tutorial >MyBatis中对ListObject 对象List的批处理插入操作

MyBatis中对ListObject 对象List的批处理插入操作

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-07 17:35:291602browse

MyBatis中对Listlt;Objectgt; 对象List的批处理插入操作:首先需要定义对象的lt;resultMap type=com.travelsky.domain.Order

MyBatis中对List 对象List的批处理插入操作:

首先需要定义对象的

然后:

 

  insert into
  ordersdish(id,ordersId,dishId)
  values
     separator=",">
   (#{item.id,jdbcType=VARCHAR},#{item.orderId,jdbcType=BIGINT},#{item.dishId,jdbcType=INTEGER})
 
 

相关阅读:MyBatis快速入门教程

linux

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn