A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
EJB 3 in Action
this week in the
EJB and other Java EE Technologies
Object Relational Mapping
iBatis, AS400: generated primary key value in code
Joined: Jun 04, 2008
Sep 21, 2008 11:08:00
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:
subject: iBatis, AS400: generated primary key value in code
downloading file from jsr 168 application
insert command of iBatis SqlMapClient
Production deployment of iBatis - Examples ?
iBatis in Action: Can I persist my POJOs with it?
OutOfMemoryError while Retrieving data
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014