openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Dick (JIRA)" <j...@apache.org>
Subject [jira] Reopened: (OPENJPA-1911) InvalidStateException is thrown when merge an entity with derived identiy
Date Thu, 10 Feb 2011 21:45:57 GMT

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

Michael Dick reopened 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.0.2, 2.1.0, 2.2.0
>            Reporter: Fay Wang
>            Assignee: Fay Wang
>             Fix For: 2.1.0, 2.2.0
>
>         Attachments: OPENJPA-1911-1.2.x.patch, OPENJPA-1911-1.3.x.patch, OPENJPA-1911-2.0.x.patch
>
>
> <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.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message