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
|