在vue中怎么设置主键执行完后子主键延后加载怎么
发布网友
发布时间:2022-04-20 23:18
我来回答
共1个回答
热心网友
时间:2022-04-21 00:47
<insert id="add" parameterType="student">
<selectKey resultType="java.lang.Short" order="AFTER" keyProperty="id">
SELECT LAST_INSERT_ID() AS id
</selectKey>
或者(
<selectKey resultType="java.lang.Short" order="BEFORE" keyProperty="id">
SELECT SEQ_TEST.NEXTVAL FROM DUAL
</selectKey>)
insert into category (name_zh, parent_id,
)
values (#{nameZh,jdbcType=VARCHAR},
#{parentId,jdbcType=SMALLINT},
)