ObjectDB Database Search

51-100 of 200 results

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

(). begin ();   entityManager.persist(parentEntity);   parentEntity.addChild(new ChildEntity ... = entityManager.find(ParentEntity.class, Long.valueOf(1));   entityManager.getTransaction(). begin ... .refresh(parentEntity);   entityManager.getTransaction(). begin ();   ChildEntity childEntity2

Remove an entity which attributes were changed - OptimisticLockException

.createEntityManager();         em.getTransaction(). begin ();   ... ;   em.getTransaction(). begin ();         MyEntity e = em ... ;    em.getTransaction(). begin ();         MyEntity

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

.getTransaction(). begin (); for(Object o : l){ em.remove(o); } em.getTransaction().commit(); l = em.createQuery("select i from Item i").getResultList(); em.getTransaction(). begin (); for(Object o : l){ em.remove(o); } em.getTransaction().commit(); em.getTransaction(). begin (); Customer c = new Customer

Optimistic locking: prevent version increment on entity collection attribute

.getTransaction(). begin ();        Document doc = new Document();    ... (). begin (); Document doc = new Document(); // Note that these readings will be added to the // document ... .getTransaction(). begin (); Document doc = new Document(); // Note that these readings will be added

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

EntityManager entityManager; public void persist(Object o) { try { transaction. begin ... .printStackTrace(); } } public void persistChild(Child child) { try { transaction. begin ... { transaction. begin (); entityManager.persist(o); transaction.commit(); } catch (Exception e) { e

Schema Update: class hierarchy change

em = emf.createEntityManager();   // Persist an entity   em.getTransaction(). begin ... ;   em.getTransaction(). begin ();   MyEntity entityWithID1 = em.find(MyEntity.class, 1 ... //  em.getTransaction(). begin (); //  MyEntity entity = new MyEntity(); //  entity.id = "123

Date field Index is corrupted due to time change

= emf.createEntityManager();         em.getTransaction(). begin ... ;   em.getTransaction(). begin ();         Long r = (Long ... ;   em.getTransaction(). begin ();           

Remove a modified entity cause an optimistic lock exception

.createEntityManager();         em.getTransaction(). begin ();   ... ;   em.getTransaction(). begin ();         MyEntity e = em ... (FlushModeType.AUTO);         em.getTransaction(). begin ();    

Persist error @ManyToMany how to define correct entities relationships

checkActive(){ if(!em.getTransaction().isActive()) em.getTransaction(). begin (); } } }     ... .getTransaction(). begin (); } } } lo Hoel I finally managed to get it working by using merge when commit fails ... (); emf.close(); } void checkActive(){ if(!em.getTransaction().isActive()) em.getTransaction(). begin

Updating Entities

- All have been verified to be passed   Main.paygradeDB.getTransaction(). begin ();   this.rate = rate ... .getResultList().forEach(p - System.out.println(p.getRate())); Main.paygradeDB.getTransaction(). begin ... .employeeDB.getTransaction(). begin (); for(Employee e : Query.employeesByPaygrade(p)) //Returns

Optimistic Locking

.currentTransaction(). begin (); pm.makePersistent(new Counter()); pm.currentTransaction().commit(); pm.close ... .getPersistenceManager(); Counter c1 = pm1.getExtent(Counter.class).iterator().next(); pm1.currentTransaction(). begin ... .currentTransaction(). begin (); c2.increase(); // First user commits - succeeds:   pm1.currentTransaction

New to Product & Having An Issue

.getTransaction(). begin (); em.persist(department); em.getTransaction().commit(); }catch(Exception e){ e ... { em.getTransaction(). begin (); em.remove(this.foundResult); em.getTransaction().commit(); }catch ... departments; try{ do{ departments = q.getResultList(); em.getTransaction(). begin (); for(Department d

zip file or JAR manifest missing

because persistence unit is not essential. trans. begin ();    ItemList i = new ItemList();    i.setItemname(" Beginning ");    em.persist(i);    trans.commit(); gzdillon Lai ... ; while (--iCnt=0){    trans. begin ();    Page uri = new Page();    uri

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

. begin ();    SLSBObjDbRemote bean = (SLSBObjDbRemote) context      ... . begin ();    SLSBObjDbRemote bean = (SLSBObjDbRemote) context      .lookup ... . what was there at the beginning of the transaction as then operated on by the subsequent transactional ops

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

.createEntityManager(); em.getTransaction(). begin (); EContainer container = EContainer.getInstance(em); long begin ... ("Created " + numItems + " in " + (end - begin ) + " milliseconds"); System.err.flush

Extra uninitialised entities spawned on merge()

.createEntityManager();         em.getTransaction(). begin ();    ... ;      em.getTransaction(). begin ();        ... ;      em.getTransaction(). begin ();        

"Attempt to lock a non entity object" error

; em.getTransaction(). begin ();         em.persist(p ... ;     em.getTransaction(). begin ();         ... ().rollback();         em.getTransaction(). begin ();  

Left join fetch behaviour doesn't retrieve children?

(). begin ();         }         ... .getTransaction().isActive()) {    em.getTransaction(). begin ();   }   MyEntity e1 ... .getTransaction(). begin ();   }   // Write 100 000 entities with 1 child for each   for (int

Remove not working

.getTransaction(). begin (); B b = new B(); b.a = new A(); em.persist(b); em.persist(b.a); em.getTransaction().commit(); em.close(); em = emf.createEntityManager(); em.getTransaction(). begin (); b = em.find(B.class ... a for-each statement.   transaction. begin get Extent, traverse its entries, delete an object in

Empty temporary dat files in the temp folder

, begin a transaction, do some stuff (find, persist, remove …) and then commit or in the case of errors ... (FlushModeType.AUTO);   em.getTransaction(). begin ();   MyEntity myEntity = new MyEntity ... .createEntityManager();   em.setFlushMode(FlushModeType.AUTO);   em.getTransaction(). begin ();  

Update more than 10000 entities by an update query fails

.createEntityManager(); emOne.getTransaction(). begin (); emOne.setFlushMode(FlushModeType.AUTO ... .createEntityManager(); emTwo.getTransaction(). begin (); emTwo.setFlushMode(FlushModeType.AUTO); { String query ... emThree = emf.createEntityManager(); emThree.getTransaction(). begin (); emThree.setFlushMode

EntityTransaction.commit() does not release a pessimistic lock

"); EntityManager em = emf.createEntityManager(); em.getTransaction(). begin (); em.persist(new Account(0 ... .getTransaction(). begin (); Account a1 = em1.find(Account.class, 0, LockModeType.PESSIMISTIC_WRITE); a1 ... (). begin (); Account a2 = em2.find(Account.class, 0, LockModeType.PESSIMISTIC_READ

Cannot save or update entity on Spring App

= entityManagerFactory.createEntityManager(); if (! em.getTransaction().isActive()) em.getTransaction(). begin (); em ... .getTransaction(). begin (); em.merge(guest); em.getTransaction().commit(); em.flush(); em.clear(); em.close ... .getTransaction(). begin (); Query q = em.createQuery(query); for(String s : map.keySet()) q

Question about modification

;             em.getTransaction(). begin ();         ... ;                     em.getTransaction(). begin ... ;             em.getTransaction(). begin ();        

Best setup for huge amount of transactions

. this .entityManager. getTransaction (). begin ();      this .device ... to begin a new transaction when a transaction is active [PMImpl] at com.objectdb.o ._PersistenceException ... merging transactions, i.e. by calling begin and commit less frequently with updates from

Refreshing a dirty object causes permanent JDOOptimisticVerificationException

;           pm.currentTransaction(). begin ();         ... ;               pm.currentTransaction(). begin ();       ... ( retrieveEntityAndMakeItDirtyByAccident  method). The dirty entity must be refreshed ( beginning

Does ObjectDB support lazy loading?

(). begin (); A a = new A(); a.list = new ArrayList (); a.list.add(new B(1)); a.list.add(new B(2)); em ... ;      em.getTransaction(). begin ();       

java.lang.UnsupportedOperationException

(); em.getTransaction(). begin (); for (Object entity : results)     em.remove(entity ... (). begin (); em.unwrap(PersistenceManager.class).newQuery(License.class).deletePersistentAll(); em

find() delay

Hi, I tried objectdb in following steps: 1, for 1 to 30 {trans. begin (); create typeC o; em.persist(o); trans.commit();} 2, for 1 to 30 {p = em.find(typeC.class, i); print(p)} So simple a test ... . My codes, again, are similar to these: 1. trans = em.getTransaction(); trans. begin (); create typeC o; em

"where in" query

;            em.getTransaction(). begin ();    ... ;       em.getTransaction(). begin ();         for (int i = 0; i

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

;            em.getTransaction(). begin ();   ... .getTransaction(). begin (); Invoice i1 = new Invoice(); i1.getItemList().add(new InvoiceItem(1, 2, i1

pesimistic Lock semantic

(); pm1.currentTransaction().setOptimistic(false); pm1.currentTransaction(). begin (); long numOfPictures ... .currentTransaction().setOptimistic(false); pm2.currentTransaction(). begin (); Picture picture2

Join performance in Objectdb

;   em.getTransaction(). begin ();         for (int i = 0; i ... .getTransaction(). begin ();         for (int i = 0; i

Unique contraint with 2 members

;           em.getTransaction(). begin ();    ... ; em.getTransaction().commit();         em.getTransaction(). begin

Unexpected behaviour upon update. Bug?

.createEntityManager(); em.getTransaction(). begin (); Update simple = new Update(); simple.i = 0; simple.v = 3; em.persist(simple); em.getTransaction().commit(); simple.v = 4; em.getTransaction(). begin (); simple = em

Storing objects problem

.getTransaction(). begin ();           for(Device dev : deviceList ... ();               em.getTransaction(). begin

multiple LEFT JOINs do not work as expected

();         em.getTransaction(). begin ();       ... ( "objectdb:test.tmp;drop"); EntityManager em = emf.createEntityManager(); em.getTransaction(). begin

Persisting collection where members are subclasses

"); System.err.println(f.getChildren()); entityManager.getTransaction(). begin (); entryDao.makePersistent(f ... ;  em.getTransaction(). begin ();         em.persist(f);  

Fantom

") .createEntityManager() .with { transaction. begin () persist(new Address(street:"Groovy")) transaction.commit ... .with { getTransaction. begin persist(Address {street = "Fantom"}) getTransaction.commit } } } @Entity class

Issue with orphanRemoval and multiple EntityManagers

;    em.getTransaction(). begin ();          ... ;       em.getTransaction(). begin ();      

failure to enforce NOT NULL for java.lang.String

); //try { tr. begin (); em.persist(r); tr.commit(); //} //catch (...) { } em.close(); emf.close ... .createEntityManager();         em.getTransaction(). begin ();  

New entity objects are duplicated on merge cascading

= emf.createEntityManager();         em.getTransaction(). begin ... ;   em.getTransaction(). begin ();         book.chapters ... .createEntityManager();         em.getTransaction(). begin ();   

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

ParentEntity();   entityManager.getTransaction(). begin ();   entityManager.persist(parentEntity);   entityManager.getTransaction().commit();   entityManager.getTransaction(). begin ... .getTransaction(). begin ();         MyEntity e = new MyEntity

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

.getTransaction(). begin ();         em.persist(new MyEntity());   ... ; em.getTransaction(). begin ();         embeddable.update();   ... with an embeddable:         em.getTransaction(). begin ();    

Unexpected exception (Error 990) - Merge with no Transaction

; EntityManager em = emf.createEntityManager();      em.getTransaction(). begin ();   ... ;  em = emf.createEntityManager();      em.getTransaction(). begin ();   ... beginning a transaction in the last step. But I think this should be allowed. Let me know. Thanks. Carl

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

{ EntityManager em = null; try { em = getEntityManager(); em.getTransaction(). begin (); em.persist(moment); em ... Exception { EntityManager em = null; try { em = getEntityManager(); em.getTransaction(). begin (); em ... Exception { EntityManager em = null; try { em = getEntityManager(); em.getTransaction(). begin (); chart

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

(with the already deployed app), then the load test begins . It seems to be related on what load I ... ;       em1.getTransaction(). begin ();        ... = emf.createEntityManager();         em2.getTransaction(). begin

ObjectDB-2.6.9: Failed to commit transaction: Failed to set numeric value of field property Element.id using reflection

it will report: Java/JVM version: 1.8 Java/JVM detail version: 1.8.0_74 ObjectDB enhancer: begin ... .."); em.getTransaction(). begin (); em.persist(project); //rely on Cascade all on ownedElements. em ... /JVM detail version: 1.8.0_74 ObjectDB enhancer: begin : (all classes within entity packages): javac

Issue with cascade delete & add/remove

;     em.getTransaction(). begin ();         em ... ;     em.getTransaction(). begin ();        

Issues with JDO Casting & Full Qualified Names

.createEntityManager();   em.getTransaction(). begin ();   MyEntity entity = new MyEntity();   entity ... ;      em.getTransaction(). begin ();