-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: em.persist() and em.remove() with em.flushmode=manual
PostPosted: Sun Jul 01, 2007 4:04 pm 
Newbie

Joined: Wed Oct 11, 2006 5:20 am
Posts: 8
Hi,

I'm using Seam's atomic conversations with session flushMode = MANUAL. I load (HQL queries) many entities and do many things with them before em.flush() is being done, such as creating new entities, removing existing entities, removing previously created entities (not persisted yet).

I've noticed that when I create new entity, do em.persist with it and then do em.remove, I receive exception with information it's not allowed operation because I'm going to remove already assigned to be persisted entity.

How to manage all these operations with lists of entities and single newwly created and removed entities to be sure which ones should be persisted, removed and so on directly before em.flush() is being fired.

Slawek


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.