Register / Login
Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
Win a copy of
Clojure in Action
this week in the
Object Relational Mapping
iBatis, AS400: generated primary key value in code
posted 7 years ago
i'm using DB2, AS400 database.
in User.xml i have:
<insert id="addUser" parameterClass="UserForm">
INSERT INTO USR (
username, passwordfirstname, lastname, role
in UserDao.java i have
Primary key is generated by iBatis (or database). How can i get this value?
For now, i'm using SELECT MAX(pKey) but it's not the happiest way for solving this problem.
I found this example.
How should i write the <insert> for making this work?
but still no luck
Hope to get answer soon!
I agree. Here's the link:
OutOfMemoryError while Retrieving data
Production deployment of iBatis - Examples ?
downloading file from jsr 168 application
iBatis in Action: Can I persist my POJOs with it?
insert command of iBatis SqlMapClient