Hi all:
 
I've got an object by oql and use db.remove(obj) to remove it.
 
And then I create another object which identity is same with the removed object.
I use db.create(obj2) to create it.
 
Tese processes are all in one transaction.
 
Wen I run the program, it show's:
org.exolab.castor.jdo.DuplicateIdentityException: Duplicate identity found for object of type castortest.Color with identity 2: an object with the same identity already exists in persistent storage
 
 at org.exolab.castor.persist.TransactionContext.markCreate(TransactionContext.java:693)
 
 at org.exolab.castor.persist.TransactionContext.create(TransactionContext.java:773)
 
 at org.exolab.castor.jdo.engine.DatabaseImpl.create(DatabaseImpl.java:338)
 
 at castortest.Test.run(Test.java:186)
 
 at java.lang.Thread.run(Thread.java:484)
 
Wat's wrong?

Reply via email to