This should be fixed in SVN now - if you want to try it, you can check
it out and build it.

Larry


On 9/3/07, Lott, Neil <[EMAIL PROTECTED]> wrote:
>
> If I have a selectKey pre within an insert statement that I have working:
>
>
>
> <parameterMap id="create-cast-param" class="castBean">
>
>       <parameter property="firstName" jdbcType="VARCHAR"
> javaType="java.lang.String"/>
>
>       <parameter property="lastName" jdbcType="VARCHAR"
> javaType="java.lang.String"/>
>
>       <parameter property="bio" jdbcType="VARCHAR"
> javaType="java.lang.String"/>
>
>       <parameter property="actorID" jdbcType="NUMERIC"
> javaType="java.lang.Integer"/>
>
>    </parameterMap>
>
>
>
>    <insert id="createCastMember"
> parameterMap="create-cast-param">
>
>       insert into OD_ACTOR
>
>       (
>
>          ACTOR_FIRST_NAME, ACTOR_LAST_NAME, ACTOR_BIO,
>
>          OD_ACTOR_ID
>
>       ) values (
>
>          ?, ?, ?,
>
>          ?
>
>       )
>
>
>
>       <selectKey resultClass="int" keyProperty="actorID" type="pre">
>
>          select OD_ACTOR_ID_SEQ.NEXTVAL from dual
>
>       </selectKey>
>
>    </insert>
>
>
>
> Let's say my insert fails, then the select key will still populate the
> actorID in my castBean.  Is there a way for this value not to be populated
> if the insert fails?

Reply via email to