[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.rt.eclipselink] Re: Database generated primary key - problems with insert

Bill,

The database platform dictates how primary key sequencing is performed. If the platform supports identity sequencing where the value is generated by the database then the PK value will not be included in the INSERT statement but will be read back into the application after the INSERT.

The DB2 platform does support identity sequencing and the value is read back in using "SELECT IDENTITY_VAL_LOCAL() FROM SYSIBM.SYSDUMMY1", as defined in DB2Platform.buildSelectQueryForIdentity().

How are you configuring your entity to have identity sequencing used?

Doug