Fixed it meself:
Since castor's open source, I added this to the
org.exolab.castor.jdo.drivers.IdentityKeyGenerator:
# IdentityKeyGenerator
if ( !fName.equals("sybase") && !fName.equals("sql-server") &&
!fName.equals("hsql") && !fName.equals("mysql") &&
!fName.equals("informix") && !fName.equals("db2")) {
throw new MappingException( Messages.format(
"mapping.keyGenNotCompatible",
getClass().getName(), fName ) );
and this to
# generateKey():
else if ( _fName.equals("db2") ) {
stmt = conn.prepareStatement(
"values IDENTITY_VAL_LOCAL()");
rs = stmt.executeQuery();
}
Seems to work.
When am I getting CVS commit permissions. ;)
/Thomas
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev