About begin

81-90 of 200Refresh
Forum
1

Should derived fields of an EmbeddedId be manually maintained by app code?

(); em.getTransaction().begin(); EContainer container = EContainer.getInstance(em); long begin = System.currentTimeMillis(); container.generateMapItems(numItems, false, em); long ... ) + " milliseconds"); System.out.println("Created " + numItems + " in " + (end - begin) + " milliseconds
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
Issue
1

[ObjectDB 2.2.6_02] Unexpected exception (Error 990) at com.objectdb.o.OBC.aJ(OBC.java:961)

= getEntityManager(); em.getTransaction().begin(); em.persist(moment ... ; try { em = getEntityManager(); em.getTransaction().begin(); em ... ; try { em = getEntityManager(); em.getTransaction().begin
Issue
1

Best practise loading big data

"); EntityManager em = emf.createEntityManager(); // create values em.getTransaction().begin ... .getTransaction().commit(); sbc = null; long counter = 0; em.getTransaction().begin(); sbc = em.find ... (EntityManager em) {         int valueCount = 0;          em.getTransaction().begin
Issue
1

Sometimes cascade persist does not work during commit

.setFlushMode(FlushModeType.AUTO); em.getTransaction().begin(); em.createQuery ... (FlushModeType.AUTO); em.getTransaction().begin(); Query query = em.createQuery ... intermediate flush operations with complete begin-commit transactions, then this indeed should work. btc_es
Issue
1

Unexpected exception (Error 990) - Merge with no Transaction

);          EntityManager em = emf.createEntityManager();      em.getTransaction().begin ... ();      em.close();      em = emf.createEntityManager();      em.getTransaction().begin ... always fails for this use case. I can make the code work by beginning a transaction in the last step
Forum
1

Visibility of changes in Transaction is not visible to a JPA QL Query

     .lookup("java:comp/UserTransaction");    tx.begin();    SLSBObjDbRemote bean ... .UserTransaction) context      .lookup("java:comp/UserTransaction");    tx.begin();    SLSBObjDbRemote ... state of the app ( i.e. what was there at the beginning of the transaction as then operated on by
Forum
1

zip file or JAR manifest missing

exactly because persistence unit is not essential. trans.begin();    ItemList i = new ItemList();    i.setItemname("Beginning");    em.persist(i);    trans.commit(); Of course it works ... .getEntityManager(); public void read(){   int iCnt = 10;   while (--iCnt>=0){    trans.begin();    Page
Forum
1

Cannot catch a PersistenceException and continue the transaction

but those don't work for me. Begin a new (nested) transaction in another method that will be rolled back instead of the first one- doesn't work. I got a message that it couldn't begin a new transaction
Forum
1

Cannot sort descending, when ordering by caluculated float in a method

.getTransaction().begin();                 Invoice i1 = new Invoice();         i1.getItemList ... /test.odb"); EntityManager em = emf.createEntityManager(); em.getTransaction().begin