Closed GoogleCodeExporter closed 9 years ago
I saw the article
http://code.google.com/p/mybatis/issues/detail?id=287
Original comment by 229594...@163.com
on 10 Oct 2011 at 3:11
If the table has an auto generated key (an identity column or from a sequence),
and the <generatedKey> configuration element is specified, then MBG will
generate an appropriate <selectKey> element and will return the value of the
generated key.
Original comment by 229594...@163.com
on 10 Oct 2011 at 3:14
Attachments:
I need to change the MBG documentation. For MyBatis3, the method will not
return the new key - it will return the number of rows inserted. This is a
change in the MyBatis3 API over iBATIS2.
To get the new key value, you need to check the property in the parameter
object (deptid in your example).
Original comment by jeffgbut...@gmail.com
on 10 Oct 2011 at 6:36
I updated the documentation to explain the differences between iBATIS2 and
MyBatis3 in the insert methods. See here for details:
http://code.google.com/p/mybatis/source/detail?r=3943
Original comment by jeffgbut...@gmail.com
on 10 Oct 2011 at 6:58
Original issue reported on code.google.com by
229594...@163.com
on 10 Oct 2011 at 3:09