Mybatis中 sequence不能自增长
解決方案:
參考:
http://leeyee.github.io/blog/2013/08/22/mybatis-auto-increment-primary-key/
?
?<insert id="addSupplier" parameterType="com.pinganfu.GouTong.common.dal.model.SmsSupplierDO" >
??<selectKey resultType="int" keyProperty="id" order="BEFORE">
???SELECT SEQ_SMS_SUPPLIER.nextval FROM dual
??</selectKey>
??INSERT INTO
??t_sms_supplier(id,supplierId,username,password,usestatus,connstatus,suppliername,supplieraddress)
??VALUES(#{id},#{supplierId,jdbcType=VARCHAR},
??#{username,jdbcType=VARCHAR},#{password,jdbcType=VARCHAR},
??#{useStatus,jdbcType=NUMERIC},#{connStatus,jdbcType=NUMERIC},
??#{supplierName,jdbcType=VARCHAR},#{supplierAddress,jdbcType=VARCHAR})
?</insert>
轉載于:https://www.cnblogs.com/mengjianzhou/p/5986807.html
總結
以上是生活随笔為你收集整理的Mybatis中 sequence不能自增长的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: grunt使用小记之开篇:grunt概述
- 下一篇: 关于64位Linux配置android开