About begin

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

Unexpected exception (Error 990) com.objectdb.o.InternalException

();                 // Persist an entity with an embeddable:         em.getTransaction().begin ... :                  em.getTransaction().begin();         embeddable.update();         em.getTransaction().commit ... :         em.getTransaction().begin();         em.persist(new MyEntity());         em.getTransaction
Forum
1

Updating Entities

().begin();   this.rate = rate;   Main.paygradeDB.getTransaction().commit();   return true ... -> System.out.println(p.getRate())); Main.paygradeDB.getTransaction().begin(); modifyTo ... ... Main.employeeDB.getTransaction().begin(); for(Employee e : Query.employeesByPaygrade(p
Forum
1

"Attempt to lock a non entity object" error

();         Person p = new Person("Ron");         em.getTransaction().begin();         em.persist(p ... ().setRetainValues(true);         em.getTransaction().begin();         p = em.find(Person.class, 1 ... and first lock: " + p.name);         em.getTransaction().rollback();         em.getTransaction().begin