Issue Details (XML | Word | Printable)

Type: Bug Bug
Status: Open Open
Priority: Major Major
Assignee: Unassigned
Reporter: Andy Jefferson
Votes: 0
Watchers: 0

If you were logged in you would be able to see more operations.
DataNucleus Store RDBMS

Map<PC, PC> with dependent key/value on delete of owner when optimistic txn can cause error

Created: 23/Feb/11 08:04 PM   Updated: 23/Feb/11 08:04 PM
Component/s: ORM
Affects Version/s: None
Fix Version/s: None

 Description  « Hide
Look at "test.jdo.application" DependentFieldTest "testDependentFieldsInverseMapsDeletion".
This passes when using pessimistic transactions, but when switching to optimistic it causes

testDependentFieldsInverseMapsDeletion(org.datanucleus.tests.DependentFieldTest) Time elapsed: 0.463 sec <<< ERROR!
javax.jdo.JDOUserException: Cannot write fields to a deleted object
        at org.datanucleus.api.jdo.state.PersistentDeleted.transitionWriteField(
        at org.datanucleus.state.AbstractStateManager.transitionWriteField(
        at org.datanucleus.state.JDOStateManagerImpl.preWriteField(
        at org.datanucleus.state.JDOStateManagerImpl.setObjectField(
        at org.datanucleus.state.JDOStateManagerImpl.setObjectField(
        at org.datanucleus.state.JDOStateManagerImpl.internalDeletePersistent(
        at org.datanucleus.state.JDOStateManagerImpl.flush(
        at org.datanucleus.ObjectManagerImpl.flushInternal(
        at org.datanucleus.ObjectManagerImpl.flush(
        at org.datanucleus.ObjectManagerImpl.preCommit(

So it gets to the remove method where it will check on dependent key/value but then tries to delete the value. Probably needs to flush things to the datastore first

Sort Order: Ascending order - Click to sort in descending order
There are no comments yet on this issue.