About merge

21-30 of 108Refresh
Issue
19

Merge throw exception "Attempt to reuse an existing primary key value"

.merge(new MyEntity(Id));         em.getTransaction().commit();         em.close();         emf
Forum
19

ObjectDB 2.6.9_06 (embedded): Cascading merge resulting in duplicate objects

"addresses" list and use EntityManager.merge(object) to persist it along with the new address
Forum
19

Problem with merging / persisitng objects with @Embeddable field

merge in the last builds. However, apparently the model in your post is invalid, since targetEntity
Manual
14

Working with JPA Entity Objects [2011-04-18]

, including merging them back to an EntityManager, is discussed in the Detached Entities section
Manual
14

Working with JPA Entity Objects

, including merging them back to an EntityManager, is discussed in the Detached Entities section
JPA Doc
8

javax.persistence.CascadeType

. The value cascade=ALL is equivalent to cascade={PERSIST, MERGE, REMOVE, REFRESH, DETACH}. Since: JPA 1.0 ... detach operation Cascade detach operation Since: JPA 2.0 CascadeType MERGE Cascade merge operation Cascade merge operation Since: JPA 1.0 CascadeType PERSIST Cascade persist operation Cascade persist
JPA Doc
8

javax.persistence.EntityManager

- if an unsupported lock call is made Since: JPA 2.0 T merge(T entity) Merge the state of the given entity into the current persistence context. 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
JDO Doc
6

javax.jdo.PersistenceManager

with the same JDO identity as the detached instance, and merges the persistent state of the detached instance into the persistent instance. Only the state of persistent fields is merged. If non-persistent state
JDO Doc
6

makePersistent(pc)

a persistent instance with the same JDO identity as the detached instance, and merges the persistent ... is merged. If non-persistent state needs to be copied, the application should use the jdoPostAttach
Forum
6

Persist error @ManyToMany how to define correct entities relationships

merge instead of persist. Thank you for the reply. If a product is created manually from the ERP ... (and they may already exist in objectdb). I will try with merge, this is probably what i need here. I just tried with merge, it kinda works except now no category entity is created, the table is empty