About begin

51-60 of 200Refresh
Forum
2

Is it possible to remove parent/child entities without refresh?

.getTransaction().begin();   entityManager.persist(parentEntity);   parentEntity.addChild(new ChildEntity ... .find(ParentEntity.class, Long.valueOf(1));   entityManager.getTransaction().begin ... .getTransaction().begin();   ChildEntity childEntity2 = parentEntity.getChildren().get("childEntity2
Forum
2

Remove an entity which attributes were changed - OptimisticLockException

");         EntityManager em = emf.createEntityManager();         em.getTransaction().begin ... ();         em = emf.createEntityManager();         em.getTransaction().begin();         MyEntity e = em ... = emf.createEntityManager();         em.getTransaction().begin();         MyEntity entity = new
Forum
2

Unable to execute update query

();                 em.getTransaction().begin();         for (int i = 0; i < 400000; i ... .getTransaction().begin();         Query query = em.createQuery("UPDATE MyEntity e SET e.x = 7 ... ("Adding objects");         em.getTransaction().begin();         for (int i = 0; i < 1000000; i
Forum
2

Update more than 10000 entities by an update query fails

"); EntityManager emOne = emf.createEntityManager(); emOne.getTransaction().begin ... emTwo = emf.createEntityManager(); emTwo.getTransaction().begin(); emTwo ... .getTransaction().begin(); emThree.setFlushMode(FlushModeType.AUTO
Forum
1

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

) { try { transaction.begin(); entityManager.persist(o ... { transaction.begin(); entityManager.persist(child); if (child ... .begin(); entityManager.persist(o); transaction.commit(); } catch
Forum
1

Date field Index is corrupted due to time change

().begin();                 // Add records         DateTime dt = null;         try {             dt ... ");         em.getTransaction().begin();         Long r = (Long) q.getSingleResult();         em ... {             q = em.createQuery("DELETE FROM DateTime");             em.getTransaction().begin();             q
Forum
1

Internal exception when updating date filed (TemporalType.DATE)

:" + newBirthday.toString());             try {                 entityManager.getTransaction().begin ... {                 entityManager.getTransaction().begin();                 for (int index = 0; index < count; index ... (); if (personsCount == 0) { entityManager.getTransaction().begin(); for (int index
Forum
1

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

.createQuery("select c from Customer c").getResultList(); em.getTransaction().begin ... = em.createQuery("select i from Item i").getResultList(); em.getTransaction().begin ... (); em.getTransaction().begin(); Customer c = new Customer(); em
Issue
1

New entity objects are duplicated on merge cascading

();         em.getTransaction().begin();         em.persist(new Book());         em.getTransaction().commit ... ();         em.getTransaction().begin();         book.chapters = Arrays.asList(new Chapter());         em.merge ... = emf.createEntityManager();         em.getTransaction().begin();         em.persist(new
Forum
1

Optimistic locking: prevent version increment on entity collection attribute

() {     // em is the EntityManager     em.getTransaction().begin();        Document doc = new ... (); em.getTransaction().begin(); Document doc = new Document ... (); em.getTransaction().begin(); Document doc = new Document(); // Note