|
hello, i've the following statements : <sql id="insertErreurObjet_fragment"> insert into FUN_ERR_OBJ values (#numErrObj:INTEGER#, #numObj:INTEGER#, #codGi:VARCHAR#, #numLang:INTEGER#, #codInf:VARCHAR#, #typErrObj:VARCHAR#, #libErrObj:VARCHAR#) </sql> and <insert id="insertErreurObjet" parameterClass="fr.unire.portal.channels.fun.csof.beans.ErreurObjet" > <include refid="insertErreurObjet_fragment"/> <!-- insert into FUN_ERR_OBJ values (#numErrObj:INTEGER#, #numObj:INTEGER#, #codGi:VARCHAR#, #numLang:INTEGER#, #codInf:VARCHAR#, #typErrObj:VARCHAR#, #libErrObj:VARCHAR#) --> <selectKey keyProperty="numErrObj" resultClass="int"> select LAST_INSERT_ID() </selectKey> </insert>and i always get the following error : Caused by: java.sql.SQLException: Duplicate key or integrity constraint violation message from server in the log file, it appears that the select LAS_INSERT_ID() is made before the insert statements it appears only if i use include. if i comment my include and uncomment the insert into statement, it works, the LAST_INSERT_ID is made after the insert! is it a bug or something i've made wrong? thanks for any help |
- Problem with include and selectKey Olivier Ziller GMail Lists
- Re: Problem with include and selectKey Larry Meadors
- Re: Problem with include and selectKey Olivier Ziller GMail Lists
- Re: Problem with include and selec... Larry Meadors
