Hi,

I want to get the automatically generated key from a newly inserted row (my
oracle database handles the generation of the key via a trigger).  

I followed the docs but it does not appear to be working.

SqlMap:

<insert id="writeOrder" parameterClass="Order"  >
        INSERT INTO
        ORDERS(order_price)
        values(#orderPrice#)
</insert>

Code:

Long id = (Long)client.insert(new SqlMapId("writeOrder"),order);


The returned value is always null. but I want the primary key id.

am I doing anything wrong here (using ibatis 2.0.9.496)  I'm sure when i
tried this on an earlier version if iBatis it was working.

Thanks,
Steve.

Reply via email to