[ https://issues.apache.org/jira/browse/OPENJPA-2796?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
sreenath bhasker updated OPENJPA-2796: -------------------------------------- Description: when trying to update an entity with merge ,it fails with the below error openjpa-2.4.3-r422266:1833086 fatal user error ,org.apache.openjpa.persistence.InvalidStateException: primary key field instance life cycle is in PNewState state and hence an existing non-default value for the identity field is not permitted.You either need to remove the @GeneratedValue annotation or modify the code to remove the initializer processing. This issue is related to https://issues.apache.org/jira/browse/OPENJPA-673 > Entity using Generated Value for primary key and a Version field fails to > merge > ------------------------------------------------------------------------------- > > Key: OPENJPA-2796 > URL: https://issues.apache.org/jira/browse/OPENJPA-2796 > Project: OpenJPA > Issue Type: Bug > Affects Versions: 2.4.3 > Reporter: sreenath bhasker > Priority: Blocker > > when trying to update an entity with merge ,it fails with the below error > openjpa-2.4.3-r422266:1833086 fatal user error > ,org.apache.openjpa.persistence.InvalidStateException: primary key field > instance life cycle is in PNewState state and hence an existing non-default > value for the identity field is not permitted.You either need to remove the > @GeneratedValue annotation or modify the code to remove the initializer > processing. > > This issue is related to https://issues.apache.org/jira/browse/OPENJPA-673 -- This message was sent by Atlassian Jira (v8.3.4#803005)