Hi,
I myself are using this kind of iBATIS config with a Sybase DB:
<insert id="insertContact" parameterClass="contact">
insert into CONTACT (PROP1, ...) values (#property1#, ...)
<selectKey resultClass="long" type="post">
select @@IDENTITY
</selectKey>
</insert>
"@@IDENTITY" is the Sybase way to retrieve the auto-incremented value of
the primary key column.
As you can see: There is no mapping of the resulting key to a property
of the parameter class. I'm retrieving the auto-incremented key by
executing
Long generatedKey = (Long) sqlMapClient.insert("insertContact", contact)
Hope this will guide you to a working solution.
Greetings
Christian