Home » Search

About merge

31-40 of 106Refresh
Forum
5

Items in list are doubled, when the entity class is not enhanced

().add(i); em.merge(c); em.getTransaction().commit(); em.refresh(c ... merging the customer object a field is setted. Previous example can be used as a test case, only: 1 ... my case is text) 3. before em.merge(c); add this line: c.setText("");   Please, can someone fix this as
Forum
4

@OneToMany(fetch = FetchType.LAZY) list is always null

); entityManager.merge(child.getParent()); transaction.commit(); } catch ... and MERGE the entity containing another one (OneToOne) entity with a byte[] array without calling ... ); // all is OK when persisting id = parent.getId; parent = find(id); parent.getByteData().getData(); merge
JPA Doc
4

javax.persistence.Version

javax.persistence Annotation Version Target: Fields (including property get methods) Specifies the version field or property of an entity class that serves as its optimistic lock value. The version is used to ensure integrity when performing the merge operation and for optimistic concurrency
Forum
4

Left join fetch behaviour doesn't retrieve children?

");         EntityManager em = null ;         // Merge parent1         em = emf.createEntityManager ... "));         em.merge(e1);         // Ok, seems to be well merged         em.getTransaction().commit ... ");   EntityManager em = null;   // Merge parent1   em = emf.createEntityManager();   if (!em
Forum
4

@MappedSuperclass and @Transient not working as I expected

; protected DataObject merge() {   //System.err.println("Saving " + this.getClass() + " id " + id ... ().begin();   DataObject merged = em.merge(this);   em.getTransaction().commit();   em.close();   //System.err.println("Got back id " + merged.id + " version " + merged.version);   merged.emf = emf
Forum
4

Issue with orphanRemoval and multiple EntityManagers

.getTransaction().begin();         //em.merge(originalOrganisation);         em.getTransaction().commit ... : Duplication of new objects during cascading merge - this is a known issue. You may subscribe to it, and until it is solved use workarounds (i.e. avoiding cascading merge to new objects). Actually in
Forum
3

Database Inconsistency or corruption

with Cascade.ALL. That is, when merging an ObjectValue, the merge operation is propagated ... all locked objects     System.out.println("Trying to merge first object " + em.getLockMode(ov ... ()){       if(em.contains(attr.getValue())){         em.merge(attr.getValue());       }else{         em.persist
Forum
3

Performance in large transactions

= create10000Entites(); entityManager.merge(entities); x.end += 1; transaction.commit ... = create10000Entites();     entityManager.merge(entities);     //query     x.end += 1; } transaction ... = System.currentTimeMillis();   MyEntity myEntity = new MyEntity();   myEntity = em.merge(myEntity
Issue
3

Unexpected exception (Error 990) - NullPointerException

I'm using Version 2.5.4_05 Maybe this Exception is created by calling em.merge()  - et ... ) at com.objectdb.jpa.EMImpl.merge(EMImpl.java:514) at com.sun.enterprise.container.common.impl.EntityManagerWrapper.merge(EntityManagerWrapper.java:305) at de.kevinfleischer.zvagent.dataenricher
Issue
3

@PrePersist not working correctly

it with @PrePersist. If i merge an object the annotated method get's called but all members are on their default values. I only tried it with new objects. So merge get's an object with id = null and therefore shoud behave like persist. (I always use merge) If i set a breakpoint before the em.merge