About flush

release

2.2.4

... EAGER fetch. Fixed critical bugs in using flush. Fixed bugs in cascading merge. Fixed a ... Fixed a bug in queries on deleted objects before commit / flush. Version 2.2.0 Added full support of JPA 2 ...

 
release

2.2.5

... EAGER fetch. Fixed critical bugs in using flush. Fixed bugs in cascading merge. Fixed a ... Fixed a bug in queries on deleted objects before commit / flush. Version 2.2.0 Added full support of JPA 2 ...

 
forum_thread

calling persist on an object more than once

results in an error (613) when the transaction is commited: [ObjectDB 2.2.4] javax.persistence.RollbackException Failed to commit transaction: Attempt to reuse an existing primary key value (common.model.UserSession:13) (error 613) at com.objectdb.jpa.EMImpl.commit(EMImpl.java:271) at javax.jdo.Transaction$commit.call(Unknown Source)   I submit that there are a number of problems with this: a) the error message is not helpful ... or another PersistenceException may be thrown at flush or commit time.) The right way to update an entity ... in the database is only performed on commit or flush . ObjectDB Support ObjectDB - Fast Object ...

 
forum_thread

EntityManager refresh problem

Dear Support, in the following code you can see a EntityManager.refresh() example. The example throws an assertion error with the following statement: Assert.assertEquals("entity 1", simpleEntity1.getFieldA()); In my opinion there should be no assertion error. I have tested the example with several objectdb versions (2.5.4, 2.5.6_06 and 2.5.7). Do you have an explanation for the assertion error? ... in the database. If we change the code and add a flush operation then  refresh should work: ... simpleEntity1 ) ; entityManager. flush ( ) ;   simpleEntity1. setFieldA ...

 
issue

An entityManager.flush() with many entities is not possible

  The following exception occures if we call entityManager.flush() where the corresponding JPA PersistenceContext has many entities and relations. What is the reason for the exception? entityManager.getTransaction().commit() instead of a entityManager.flush() works correctly. Unfortunately I have not found a simple example to reproduce this exception. The entity model of the flushed JPA PersistenceContext is too complex.  ... The following exception occures if we call entityManager.flush() where the corresponding JPA PersistenceContext has many entities and ... instead of a entityManager.flush() works correctly. Unfortunately I have not found a simple example to ... at com.objectdb.o.OBM.flush(OBM.java:763)         ... 7 ...

 
issue

GC Memory

Hi there, I was hoping to get some support on ObjectDB regarding memory usage.  I received the following error.  Context for the error is found below. [2015-04-27 13:16:18 #20 server] ... Note that only commit can release memory, not flush . So bulk load of data into the database should be done in smaller ...

 
issue

objectdb-2.6.9_06: Extended Persistence Context fails: 'Attempt to begin a new transaction when a transaction is active'

objectdb-2.6.9_01 NetBeans8.1+Glassfish4.1.1 Mac OS X Possibly related: How to Use a SF with extended Persistence Context? Test mini web app at: https://www.webel.com.au/downloads/objectdb/GreensoftObjectdbTestWebMini3683.2016-09-29.tgz ... USE_OBJECTDB ) { em. flush ( ) ; //ObjectDB ensure id exists. ... //Attempt to flush a transaction when no transaction is active (error 611) ... javax.persistence.TransactionRequiredException Attempt to flush a transaction when no transaction is active (error 611) at ...

 
forum_thread

Performance in large transactions

Hello, we have a performance problem when we use a large transaction. Let's do exactly the same in several transactions the ObjectDB works much faster. In our use case, we create many new entities and between the creations we call a select query. The execution of the query becomes slower at each iteration. (In the query, we search for an item of type Entity2. However, there is only one entity.)   Pseudocode for the fast and the slow solution FAST: ... automatically in order to apply changes to the database on flush/commit. This could be done by keeping a copy of every managed object and comparing copies to actual objects on every flush or commit , but this is inefficient. Enhanced classes enable ...

 
forum_thread

Exception on creation when running multithreaded

Hi, I'm trying to test the creation of an object from my datamodel(Organisation) and the creation process includes the creation of an acl for the newly created organisation all in the same transaction. The process is as followed: 1. The organisation gets created 2. The acl is being searched to check if it already exists 3. if it exists it will be updated, otherwise it will be created   #1 2011-08-04 07:08 Hi, I'm trying to test the creation of an object from my datamodel(Organisation) and the creation pro ...

 
issue

[ObjectDB 2.6.0_04] Unexpected exception (Error 990) com.objectdb.jpa.JpaQuery.getResultList

Hello, the following exception appears when we execute a query:   Bug Version: 2.6.0 Priority: Normal Status: Active Replies: 1 Type:  Bug ...