Mybatis学习之selectKey标签用法

https://blog.csdn.net/weixin_42586723/article/details/108715588

SelectKey需要注意order属性,像Mysql一类支持自动增长类型的数据库中,order需要设置为after才会取到正确的值。

像Oracle这样取序列的情况,需要设置为before,否则会主键错误问题。

posted @ 2020-10-17 22:49  路要一步一步走  阅读(1167)  评论(0编辑  收藏  举报