Mybatis中的useGeneratedKeys="true" keyProperty="cid"有什么用?

当咱们插入数据时主键是自增的,当插完咱们须要立马用的时候就能够在xml文件上加上,加上以后插入完数据就能够x.getID()拿到ID值。web <insert id="insertSelective" parameterType="com.xxx.dataobject.UserDo" keyProperty="id" useGeneratedKeys="true">
相关文章
相关标签/搜索