ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Volkmann <m...@ociweb.com>
Subject getting auto-gen key after insert
Date Thu, 08 Feb 2007 17:36:07 GMT
I used Abator to generate Spring DAOs. When I use the insert method  
of the generated DAOs to insert a new row in a table, how can I get  
the primary key that was assigned to the record when it is set in the  
table definition to auto-generate an integer key?

When I just use iBATIS without Spring DAOs, I can do this

   sqlMap.insert("Artist.insert", artist);

and it populates the Java object artist with the generated key.

However, when I use the Abator generated Spring DAOs and do this

   artistDAO.insert(artist);

it doesn't not populate the Java object artist with the generated key.

Mime
View raw message