Thank you so much for responding! That was the reason. You stare at
something so long - you don't realize what the hell you're looking at
Darek Dober wrote:
>How do you invoke your sqlmap statement.
>I had the same problem
>You should use:
>with update method selectKey is'nt invoked, as someone mentioned before for
>----- Original Message -----
>From: "Don Pendergast" <[hidden email]>
>To: <[hidden email]>
>Sent: Wednesday, May 04, 2005 10:25 PM
>Subject: selectKey and Oracle
>Is there something special I need to do to get the selectKey tag to populate
>field? I've been looking at this thing for quite a while now and cannot
>out what I'm doing wrong.
>Here is the entry in the sqlmap file:
><typeAlias alias="costCenter" type="edu.ohio.cost.domain.CostObject"/>
><insert id="createObject" parameterClass="costObject">
> <selectKey resultClass="int" keyProperty="costObjectId">
> select COST_OBJECT_S.nextval as costObjectId from dual
> insert into COST_OBJECT
> (COST_OBJECT_ID, COST_OBJECT_TYPE, STATUS, CREATED_BY, DATE_CREATED,
> (#costObjectId#, #costObjectType#, #status#, #createdBy#, sysdate, 1)
>The CostObject.java file has a getter/setter for costObjectId (int).
>The sequence (COST_OBJECT_S) is set up and works fine.
>When I turn on logging, there is no reference to anything in the
>portion of the insert statement and the costObjectId is always 0. I've
>change from the primitive int to the object, but the value of costObjectId
>I'm hoping I've just overlooked something small, but at this point I
>Any assistance would be greatly appreciated.
>p.s. I'm using the 2.0.9 release of iBatis. Also, sorry if this
>appears twice - I sent it several hours ago and it has never shown up.