openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Fay Wang (JIRA)" <j...@apache.org>
Subject [jira] Closed: (OPENJPA-1911) InvalidStateException is thrown when merge an entity with derived identiy
Date Mon, 03 Jan 2011 19:35:48 GMT

     [ https://issues.apache.org/jira/browse/OPENJPA-1911?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Fay Wang closed OPENJPA-1911.
-----------------------------


> InvalidStateException is thrown when merge an entity with derived identiy
> -------------------------------------------------------------------------
>
>                 Key: OPENJPA-1911
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1911
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: kernel
>    Affects Versions: 2.2.0
>            Reporter: Fay Wang
>            Assignee: Fay Wang
>             Fix For: 2.2.0
>
>
> <openjpa-2.0.2-SNAPSHOT-r422266:1027632M nonfatal user error> org.apache.openjpa.persistence.InvalidStateException:
Attempt to change a primary key field of an instance that already has a final object id. 
Only new, unflushed instances whose id you have not retrieved can have their primary keys
changed.
> FailedObject: org.apache.openjpa.persistence.xs.AccountingHierarchyRate-TESTING::1
> 	at org.apache.openjpa.kernel.StateManagerImpl.assertNoPrimaryKeyChange(StateManagerImpl.java:2086)
> 	at org.apache.openjpa.kernel.StateManagerImpl.settingObjectField(StateManagerImpl.java:2020)
> 	at org.apache.openjpa.kernel.AttachStrategy.attachField(AttachStrategy.java:205)
> 	at org.apache.openjpa.kernel.VersionAttachStrategy.attach(VersionAttachStrategy.java:161)
> 	at org.apache.openjpa.kernel.AttachManager.attach(AttachManager.java:251)
> 	at org.apache.openjpa.kernel.AttachStrategy.attachCollection(AttachStrategy.java:339)
> 	at org.apache.openjpa.kernel.AttachStrategy.replaceList(AttachStrategy.java:399)
> 	at org.apache.openjpa.kernel.AttachStrategy.attachField(AttachStrategy.java:224)
> 	at org.apache.openjpa.kernel.VersionAttachStrategy.attach(VersionAttachStrategy.java:161)
> 	at org.apache.openjpa.kernel.AttachManager.attach(AttachManager.java:251)
> 	at org.apache.openjpa.kernel.AttachManager.attach(AttachManager.java:104)
> 	at org.apache.openjpa.kernel.BrokerImpl.attach(BrokerImpl.java:3400)
> 	at org.apache.openjpa.kernel.DelegatingBroker.attach(DelegatingBroker.java:1206)
> 	at org.apache.openjpa.persistence.EntityManagerImpl.merge(EntityManagerImpl.java:871)
> 	at org.apache.openjpa.persistence.xs.TestMergeComplexKey.test(TestMergeComplexKey.java:29)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message