About begin

61-70 of 200Refresh
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
Forum
1

Persist error @ManyToMany how to define correct entities relationships

(){ if(!em.getTransaction().isActive()) em.getTransaction().begin ... ().isActive()) em.getTransaction().begin(); } } } I finally managed ... ().begin(); } } } If you use merge, you many want to change the cascade setting
Forum
1

Remove a modified entity cause an optimistic lock exception

= emf.createEntityManager();         em.getTransaction().begin();         em.persist(new MyEntity ... .createEntityManager();         em.getTransaction().begin();         MyEntity e = em.find(MyEntity.class, 1 ... (FlushModeType.AUTO);         em.getTransaction().begin();         em.persist(new MyEntity
Issue
1

Remove of an entry from a @OneToMany collection is not possible if the enhancer is disabled

parentEntity = new ParentEntity();   entityManager.getTransaction().begin();   entityManager.persist(parentEntity);   entityManager.getTransaction().commit();   entityManager.getTransaction().begin ... ");         EntityManager em = emf.createEntityManager();         em.getTransaction().begin();         MyEntity
Forum
1

Schema Update: class hierarchy change

.createEntityManager();   // Persist an entity   em.getTransaction().begin();   MyEntity entity = new ... .persist(entity);   em.getTransaction().commit();     em.getTransaction().begin();   MyEntity ... ();   //don't create a new object!   //  // Persist an entity //  em.getTransaction().begin
Issue
1

stress test -> com.objectdb.o.InternalException: null

is started (with the already deployed app), then the load test begins. It seems to be related ... ");                 EntityManager em1 = emf.createEntityManager();         em1.getTransaction().begin();         em1.persist ... .createEntityManager();         em2.getTransaction().begin();         em2.persist(new TestEntity());         em2