About flush

forum_thread

Database(*.odb) file size on disk

Hello, we have questions about the file size of ObjectDB database on disk. Can you tell us something about how the deleting of entities affects the size of *.odb files on disk? -Will the released memory always used by new entities? -Will be the database file automatically reduced?   We have created a small test, in which we create and delete entities. It looks like that the released memory are reused but the the file not resized. The database is at the end empty again, but larger than the initial size. ... ( ) ; }   em. flush ( ) ;   System. out . println ( ...

 
release

2.2.3

... Fixed a bug in queries on deleted objects before commit / flush. Version 2.2.0 Added full support of JPA 2 ...

 
forum_thread

Cascading persistence through an inverse field

Hi! I was playing with cascading persistence with @ManyToMany and inverse @ManyToMany fields, and I noticed that I can only get cascading persistence in one direction. If the "owner" of the relationship is persistent, then objects that are added to the relationship are automatically made persistent. However, I can not get this to work the other way around. I would also like the relationship owner to be persisted if a persisted object is added on the owner side. I have included a minimal example: ... retrieved (or refreshed) from the database after commit or flush. You may try synchronizing the two sides of the bidirectional ...

 
manual

Working with JPA Entity Objects

Explains the entity object lifecycle and the persistence context. Entity objects are in-memory instances of entity classes (persistable user defined classes), which can represent physical objects in the database. Managing an ObjectDB Object Database using JPA requires using entity objects for many oper ...

 
forum_thread

Where Does ObjectDB Block/Lock?

These are questions asked in the context of the proposed architecture described in the forum thread titled, "Sample JDO Architecture for Follow Up Questions".   Questions about blocking/locking.  With my PersistenceManager multiThreaded=true architecture, I desire to know where ObjectDB is actually blocking/locking so I might adapt to achieve better concurrency. 1) Where are locks when accessing PersistenceManager by multiple threads? 2) Does it lock at PersistenceManager.currentTransaction()? ... transactions may include many operations. On commit (or flush) optimistic lock checks verify that different transactions do not ...

 
forum_thread

Error using query with MAX() function

I have a class that is persisting a Entity that holds remarks and a time. Then when I query for the latest remark I get a internal error when the remark is larger than 1966 chars. Here is a test class and entity that reproduces the problem on my system. ... If you are using EntityManager 's flush you should try build 2.2.3_04 that fixes a critical bug. ... == 0 ) {   em. flush ( ) ;   em. clear ( ) ...

 
forum_thread

What algorithm in find()

I test the time cost for find(), obtain a linear complexity with the following codes: ... the persistence context cache slows commit / flush , since every entity object in that cache has to be checked against an ...

 
forum_thread

Duplicate Entity class names causes Exception in Query

I have two Entities which have the same class name but reside in different packages, only one of them is mentioned in the persistence.xml. I a NamedQuery I use the unqualified class name of one of these entities. If I execute that query I get an exception;   ... ) ; //ObjectDb demands we flush transaction to db if we wish to see its results q. setFlushMode ... ( ) ) ; //ObjectDb demands we flush transaction to db if we wish to see its results q. setFlushMode ...

 
forum_thread

High memory consumption even after close() of EntityManagerFactory

Hello, we still have memory usage problems. When debugging, we have now observed a case in which the execution of multiple queries increasingly byte array were generated (about 1.5 GB) which from GC could not be released. Not even after the EntityManagerFactory closed. We created a small test with which you can observe similar behavior. The huge memory usage only occurs if we execute the query (line 56 to 61). If we remove this query, all is well. The memory is only released after we re-run a query (on a different database). ... Other lists, including query results, flush updates, etc. are not affected by the new option, but can be controlled ...

 
issue

NullPointerException when using multithreading

[ObjectDB 2.4.4_08] Unexpected exception (Error 990)   Generated by Java HotSpot(TM) Client VM 1.6.0_29 (on Windows 7 6.1). Please report this error on http://www.objectdb.com/database/issue/new com.objectdb.o.InternalException: java.lang.NullPointerException: null java.lang.NullPointerException at com.objectdb.o.ENT.C(ENT.java:557) at com.objectdb.o.OBM.bz(OBM.java:385) at com.objectdb.o.OBM.bz(OBM.java:261) at com.objectdb.jpa.EMImpl.persist(EMImpl.java:377) at ... ... After 500 persists, the thread calls a flush() on the database.  To my knowledge the entity and embedded ...