In DB2 v8 on OS/390, the statement:
Code:
SELECT IDENTITY_VAL_LOCAL() FROM SYSIBM.SYSDUMMY1
will return <null> if there has been a commit between the single insert statement and the retrieval of the identity value.
I'm not sure if this is intended, but it surely is annoying, especially if you flush the session in your code and get an hibernate error back saying the the ID of your newly created object is null if you use it afterwards.
This does not happend on DB2 UDB on any other platform, since a commit between the insert and retrieval has no effect on the identity_val_local() function.