About EntityManager

forum_thread

Join performance in Objectdb

select count(e) from Meta e, ImageNet i, Page p where e.idImage=i.id and e.idPage=p.id; So simple a command cause me half an hour and is running now! Each table has about 160K records. What formula can predict the time for such counting? TIA ... ) ; EntityManager em = emf. createEntityManager ( ) ; ... ) ; EntityManager em = emf. createEntityManager ( ) ; ...

 
forum_thread

Problem on JPA Merge Entity.

Hello, I have a problem with the EntityManager.merge() function. I set a property value of an entity (statement) with an other entity (newSingleConstraint). newSingleValue is already persisted. I do this myself (no use of cascade because sometimes the newSingleValue is already in database).   The statement update don't throw exception. And when i try to reload statement the value i have set before is a null value. I check with the Explorer, the statement has a null value on the property and the newSingleValue is present.... Hello, I have a problem with the EntityManager.merge() function. I set a property value of an entity ... @ PersistenceContext private EntityManager entityManager ;   public void ...

 
forum_thread

Unexpected behaviour upon update. Bug?

This sample does not work as I expect.  Why?  Is it a bug? Below is the complete program. Expect: 3 Get: 4 import java.io.Serializable; import java.util.List; import javax.persistence.*; @Entity public class Update implements Serializable   {     @Id     int i;     int v; ... ( "ODB.odb" ) ; EntityManager em = emf. createEntityManager ( ) ; ... to work as expected. The entity object is cached in the EntityManager  as a managed entity object and it is returned with the ...

 
forum_thread

"where in" query

Is it possible to run a query selecting values that exist in a provided list? e.g. something like: SELECT u FROM User m WHERE u.username IN ('test_user','anotheruser') I've tried various combinations of this including passing the list as a named parameter but without any joy. The only similar examples I can find in the docs involve a join query - but my list isn't in the database - and the MEMBER OF operator doesn't seem to do what I want (although I may be using it incorrectly! ... "$objectdb/db/test.odb" ) ; EntityManager em = emf. createEntityManager ( ) ; ... ) ; EntityManager em = emf. createEntityManager ( ) ; ...

 
issue

Threaded Test - Failed to commit transaction: Unexpected internal exception

Hi I'm trying to create a simple producer-consumer queue scenario but am getting the followin exception: ... put ( Point p ) { EntityManager em = _emf. createEntityManager ( ) ; ... Point take ( ) { EntityManager em = _emf. createEntityManager ( ) ; ...

 
forum_thread

Insertion Speed Rate and Batch Load

1. I got about 10K inserts / second, is it normal? I would expect more than that, like close to 100K/second. I can definitely do 80K inserts/seconds on Oracle with batch insert on table with one primary key. 2. Is batch update/insert operation supported? I attached the files. ... thread uses a separate transaction, and moreover, a new EntityManager  per stored entity object. A batch load should reuse the EntityManager and persist a large number of objects per transaction. This is ...

 
issue

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

Hello, we get an exception if we use Enhanced Entities. With not enhanced Entities we get no error. ... ) ; EntityManager em = emf. createEntityManager ( ) ; ... ) ; EntityManager em = emf. createEntityManager ( ) ; ...

 
manual

JPA Criteria API Queries

Explains how to use the JPA Criteria API (CriteriaBuilder, CriteriaQuery, etc.) to build JPQL like queries.... em. getCriteriaBuilder getCriteriaBuilder() EntityManager's method Return an instance of CriteriaBuilder for the ... Reference Page... method or by the  EntityManager javax.persistence.EntityManager JPA interface ...

 
forum_thread

Entity has be persistended,but query not fetched?

I create a new entity T newT and persistend it,then I create a query "select t from T t" to fetch all T entities.But  then the newT is not contain in the query result. Why? ... ( "$objectdb/flush.odb" ) ; EntityManager em = emf. createEntityManager ( ) ; ... } Maybe you are using a different EntityManager for the query? Updates can only be visible before ...

 
issue

spuriously objectdb objects have null references

from time to time we have in a multi threaded environment objects where all the references are null (i.e. references actions, childNodes), even after a subsequent refresh. we are using a separate entityManager per thread and have a central point where we encapsulated all the needed entitymanager methods and protected them with synchronized like:   ... ... a subsequent refresh. we are using a separate entityManager per thread and have a central point where we encapsulated all the needed entitymanager methods and protected them with synchronized like: ...