ValidationException.nullPrimaryKeyInUnitOfWorkClone Exception When Using Zero as a Primary Key
(Doc ID 1536334.1)
Last updated on FEBRUARY 10, 2022
Applies to:
Oracle TopLink - Version 11.1.1.6.0 and laterInformation in this document applies to any platform.
Symptoms
An entity UserEntity is defined mapping to this database table :
CREATE TABLE usur_AUX (
ID NUMBER NOT NULL PRIMARY KEY,
NOMBRE VARCHAR(32),
APEL1 VARCHAR(32),
APEL2 VARCHAR(32)
);
One row has been inserted with a primary key id equal to 0 :
INSERT INTO usur_AUX VALUES (0,'PRUEB','PRUEB','PRUEB');
After fetching the UserEntity with ID equal to 0 , this entity is updated with the following code
(where UserEntity usur is containing the new attribute values of the entity ) :
Changes
Cause
To view full details, sign in with your My Oracle Support account. |
|
Don't have a My Oracle Support account? Click to get started! |
In this Document
Symptoms |
Changes |
Cause |
Solution |
References |