About EntityManagerFactory

issue

Issue with cascade delete & add/remove

Hi, Please see the attached sample project (important: classes need to be enhanced as done in the pom.xml file). ... ] args ) {   EntityManagerFactory emf = Persistence . ...

 
forum_thread

Remove a modified entity cause an optimistic lock exception

Hello, the following examples load and modify an entity, and load and remove the same entity. The first example 'SetAndRemoveIssue.java' is a simple java program which executes without errors. The second example is an OSGi program which fails with an optimistic lock exception. Both examples are equivalent, please execute SetAndRemoveIssue.java (in the OSGi example as a plugin-test). Can you explain the optimistic lock exception? ... [ ] args ) { EntityManagerFactory emf = Persistence . ... args) {         EntityManagerFactory emf = ...

 
issue

NPE at com.objectdb.jpa.JpaQuery.getResultList

This is very similar to issue #51  raised by kaosko .   So perhaps I should have added it there.  Anyway, here it is....   ... int firstResult ) {   EntityManagerFactory emf = Persistence . ...

 
forum_thread

IN expression in a Criteria Query

Hello, I am trying to migrate my Spring project from Hibernate to ObjectDB. On ObjectDB page, it is written that ObjectDB is 100% compatible with JPA. However, I have problem with this JPQL query: SELECT e FROM Employee e WHERE e.present = false AND NOT EXISTS (SELECT c FROM Computer c WHERE c.employeeEntity = e) ORDER BY e.name with Hibernate, there was no problem with this query, but ObjectDB throws exception: ... [ ] args ) { EntityManagerFactory emf = Persistence . ... [ ] args ) { EntityManagerFactory emf = Persistence . ...

 
issue

Super class' field access fails

I have a base class: public abstract class HotObject extends BaseObject {   private Integer activity;   protected HotObject() {     activity = 1;   }   public Integer getActivity() {     return activity;   }   public void setActivity(Integer activity) {     this.activity = activity;   } ... [ ] args ) { EntityManagerFactory emf = Persistence . ...

 
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. ... [ ] args ) { EntityManagerFactory emf = Persistence . ...

 
issue

NPE on em.createQuery(query).getResultList()

(JPA2 support getting better but still not quite there, excellent progress regardless). Difficult to see what's going on because of obfuscation, but it didn't look like this exact issue was reported yet (seemed to differ from the other reported and fixed NPEs): ... ] args ) {   EntityManagerFactory emf = Persistence . ...

 
forum_thread

Using Enum type in NamedQuery: Field is not found in type

I'm trying to switch an application that worked fine in Hibernate to ObjectDB and am having issues with queries that reference enum types. On my entity object is a static enum public static enum Type {     A,B,C } that is stored in an @Enumerated member variable private Type type; @Enumerated public Type getType() {     return type; } I then try to query this field in the following JPA Named Query ... [ ] args ) { EntityManagerFactory emf = Persistence . ...

 
forum_thread

Remove not working

Hello! We have a strange problem. ... "objectdb:$objectdb/db/test.tmp;drop" ; EntityManagerFactory emf = Persistence . ...

 
issue

After using the enhancer, Lazy loaded collections are no longer loading. They are set as null

Environment: Mac OS X JVM: Java 1.8 u 20 Steps to reproduce Use the following classes: /** Account Class **/ ... args ) throws Exception { EntityManagerFactory emf = Persistence . ...