About Persistence Context

forum_thread

Find the error...JPA ENTITY HIBERNATE

Hey guys....i am searching for some days for the problem...Maybe one of you can find the error   DATABASE SHEMA: https://www.file-upload.net/download-12530779/2017-06-0214_25_00-MySQLWorkbench.png.html       Entities:   ... java. util . Set ;   import javax. persistence . CascadeType ; import javax. persistence . ... Use ctrl + right click to open the browser context menu in the editing area (e.g. for using a browser spell ...

 
forum_thread

Cannot cast com.objectdb.jpa.Provider to PersistenceProvider

Hi! I'm trying to get ObjectDB 2.5.1_1 work with stable Glassfish 4 in a Java EE 7 NetBeans project. objectdb.jar is added into GF's classpath (domains\domain1\lib\ext folder). Any help, please?... Thanks! Here it is the persistence.xml config: ... Any help, please?... Thanks! Here it is the persistence.xml config: <?xml version = "1.0" encoding = ... Use ctrl + right click to open the browser context menu in the editing area (e.g. for using a browser spell ...

 
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: ... java. util . List ;   import javax. persistence . CascadeType ; import javax. persistence . ... new  MyEntityElement instances in the persistence context are untrackable and requires comparison on every flush. To ...

 
manual

JPA Query API

Describes the API that JPA provides for running queries against the database.... in JPA 2 by two interfaces - the old Query javax.persistence.Query JPA interface Interface used to control query ... Interface used to interact with the persistence context. See JavaDoc Reference Page... (represented by em in ...

 
forum_thread

failure to enforce NOT NULL for java.lang.String

my test cases are indicating that @Basic(optional=false) and @Persistent(nullValue=NullValue.EXCEPTION) are not enforced in 2.3.7_08 or that i have failed to understand how to annotate. example: @Entity public class Request {   public Request() { }   @Id @GeneratedValue(strategy=GenerationType.IDENTITY)   private Long id; ... { EntityManagerFactory emf = Persistence . createEntityManagerFactory ( "target/test.odb;drop" ... Use ctrl + right click to open the browser context menu in the editing area (e.g. for using a browser spell ...

 
forum_thread

Merge with Parent/Child entities not possible

Can you please tell me why the following unit test ends with "[ObjectDB 2.5.7_02] javax.persistence.RollbackException"? ... following unit test ends with "[ObjectDB 2.5.7_02] javax.persistence.RollbackException"? package example ;   import ... Use ctrl + right click to open the browser context menu in the editing area (e.g. for using a browser spell ...

 
forum_thread

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

If I have an Entity which has a primary key which is derived and I am implementing it using @EmbeddedId, am I responsible for maintaining the derived fields of the @EmbeddedId? I could not find anything in the JPA 2.0 spec http://download.oracle.com/auth/otn-pub/jcp/persistence-2.0-fr-oth-JSpec/persistence-2_0-final-spec.pdf?e=1317047713&h=54831c176e81a244a4c309e13eba0b27 which tells me what to expect. ... Use ctrl + right click to open the browser context menu in the editing area (e.g. for using a browser spell ...

 
forum_thread

Conflicting modifiers .... (javax.persistence.Id, javax.persistence.ManyToOne)

I have two classes a Container type class and another class that is 'contained' by that class. The contained class, CompoundKeyMapItem, represents an alternate implementation of an object held in a Map, and uses a Compound Primary Key. The contained class therefore uses an @IdClass. This all works fine on Eclipselink. However when I try and run this in ObjectDb I get the following error; ... Problem Creating Database [ObjectDB 2.2.9_05] javax.persistence.PersistenceException Conflicting modifiers for field ... (javax.persistence.Id, javax.persistence.ManyToOne) (error 322) at ... Use ctrl + right click to open the browser context menu in the editing area (e.g. for using a browser spell ...

 
api-jdo

makePersistent(pc)

Make the parameter instance persistent in this PersistenceManager.(Method of javax.jdo.PersistenceManager)

 
forum_thread

mapping file is not being loaded

Hi, I am evaluating ObjectDB by using it with an in-house developed library in order to prototype its capabilities / performance. I am having a problem in that the in-house library in question reads a simple configuration file to determine available persistence units, and then bootstraps them using the JPA Persistance.createEntityManagerFactory() method and passing in the persistence unit name (again, obtained from the configuration file ). ... reads a simple configuration file to determine available persistence units, and then bootstraps them using the JPA ... method and passing in the persistence unit name (again, obtained from the configuration file ). ... Use ctrl + right click to open the browser context menu in the editing area (e.g. for using a browser spell ...