Java Mailing List Archive

Home » user-java.ibatis »

[ibatis 3] insert return generated id?

Josh Joy


Replies: Find Java Web Hosting

Author LoginPost Reply

I'm using MS Sql Server 2005, previously with iBatis v2.x, I was able
to get the generated id from an insert as the return value for a

With iBatis v3, the return value is always "1", which I'm assuming
means 1 row was inserted.

How can I configure the api to return the generated id from an insert?
For the insert, I am using keyProperty="id" useGeneratedKeys="true",
and that seems to work... my object property id has the generated id.
Though I would like it as the return value for the insert method as


To unsubscribe, e-mail: user-java-unsubscribe@(protected)
For additional commands, e-mail: user-java-help@(protected)

©2008 - Jax Systems, LLC, U.S.A.