openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Craig L Russell <Craig.Russ...@Sun.COM>
Subject Re: Casade Persist
Date Tue, 04 Dec 2007 22:32:09 GMT

I can't tell from your description what might be going wrong, but  
there is one clue. You ask if all entities should be persisted in one  
transaction. Not necessarily. But if you have several transactions,  
it's possible that you are using detached instances and the problem  
might be that if you assign an instance to a field of a detached  
instance and then commit the transaction, nothing happens!

You need to make sure you merge all detached instances or nothing is  
supposed to happen.

Can you attach a test case?


On Dec 4, 2007, at 2:24 PM, JuneG wrote:

> we have an entity has one-to-many relationship to several other  
> entities, we
> use EntityManager's persist method to do cascade persist.  
> Occasionally one
> of the entities in this graph did not get persisted while all the  
> others
> were persisted successfully, and there is no exception raised why  
> the entity
> did not get persisted. If we re run the process all entities will be
> persisted successfully. any idea why this is happening? is that all  
> entities
> should be persisted in one transaction? we are using weblogic 10
> any input will be appreciated. thanks!!
> -- 
> View this message in context: 
> tf4946103.html#a14160955
> Sent from the OpenJPA Users mailing list archive at

Craig Russell
Architect, Sun Java Enterprise System
408 276-5638
P.S. A good JDO? O, Gasp!

View raw message