Home » Search

About merge

1-10 of 106Refresh
Manual
106

Detached Entity Objects

the database unless modified detached objects are merged back into an EntityManager to become managed ... invocation of rollback or by a commit failure. Explicit Merge Detached objects can be attached to any EntityManager by using the merge method: em.merge(employee); The content of the specified
JPA Doc
61

merge(entity)

Method javax.persistence.EntityManager T merge(   T entity ) Merge the state of the given entity into the current persistence context. Parameters: entity - entity instance Returns: the managed instance that the state was merged to Throws: IllegalArgumentException - if instance is not an entity or
JPA Doc
59

CascadeType.MERGE

Enum Constant javax.persistence.CascadeType MERGE Cascade merge operation Since: JPA 1.0
Manual
50

Advanced JPA Topics

Describes advanced JPA topics - detached entity objects, lock management and entity lifecycle events.
Forum
28

Selective merge/cascade of detatched entity

Company. Each salesman is given many numerical targets for the new company. I then need to merge each ... ); for (Salesman s : salesmen) em.merge(s); This appears to have the effect of checking and merging ... objects attached to each Salesman, and each Salesman has hundreds of targets for each Company, this merge
Forum
24

Merge Issue: Attempt to reuse an existing primary key value

a feature on an ordinary merge operation. This is the test case ( work in 2.4.6 version ) : 2 parents ... ");         EntityManager em = null ;         // Merge parent1         em = emf ... ("child1"));         em.merge(e1);         em.getTransaction().commit();         em.clear
Forum
23

Extra uninitialised entities spawned on merge()

_MERGE = true;     /**      * @param args the command line arguments      */     public static ... );                 if (DO_PERSIST_BEFORE_MERGE) {             em.getTransaction().begin();             em.persist(e ... ();         em.merge(root);         em.getTransaction().commit();         TypedQuery query = em
Forum
22

Merge on detached entities

Hello, it is possible to merge detached entities? There are some attached entities which load from ... the fields of the detached entities will be changed and a merge by em.merge(entity) will be saved the entities. Can this works correctly? How are the rules of the merge process? Do the changed fields
Forum
22

Cascading merge() leading to "Attempt to persist a reference to a non managed instance" error

with a parent/child relationship and cascading merge() operations. The parent has an application defined id ... ();     tx.begin();     em.merge(new Child(new Parent("Joe")));     em.merge(new Child(new Parent("Tim ... or 159 Thanks for your assistance.   Thank you for reporting this problem. Cascading merge to new
Forum
21

EntityManager.merge gives EntityNotFoundException

Just started using objectdb (2.3.4). Calling EntityManager.merge for a new (non-managed) object ... .EntityNotFoundException Entity is not found: classdb.Test#'id' (error 631) at com.objectdb.jpa.EMImpl.merge(EMImpl.java:456) at classdb.Test.main(Test.java:32) You are right, merging non managed (new) entity