About Persistence Context

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

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 ...

 
api-jdo

makePersistent(pc)

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

 
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

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 ...

 
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

Schema Update: class hierarchy change

Hello, we try to change the class hierarchy of an Entity. You wrote www.objectdb.com/database/forum/899 that ObjectDB support automatic schema evolution for adding and removing fields and for class hierarchy change.   But our small test failed: At first create a DataBase with one Object of MyEntity ... classhierachychange ;   import javax. persistence . Basic ; import javax. persistence . Entity ... Use ctrl + right click to open the browser context menu in the editing area (e.g. for using a browser spell ...

 
forum_thread

Extra uninitialised entities spawned on merge()

In the following, Element is a base entity class, with a bi-directional @ManyToOne-@OneToMany relationship Element owner - List<Element> ownedElements, and Example is a subclass entity with a relationship @OneToOne Element child. ...   import java. util . *; import javax. persistence . *;   public class ... EntityManagerFactory emf = Persistence . createEntityManagerFactory ( ... persist() operation. It adds the entity to the persistence context, but instead of adding the original entity instance, it creates a new ...

 
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 ...

 
forum_thread

JBoss 7 startup fails

Hi, I was having a go with entity beans 3.x jboss 7, objectdb and the guestbook web application but cannot come out of the swamp. I use eclipse indigo as IDE The "src" folder contains the pachake guest and within the classes: Guest.java, GuestListener.java and GuestServlet.java The WebContent/META-INF dir contains: context.xml ... The WebContent/META-INF dir contains: context.xml <?xml version = "1.0" encoding = ... = "true" path = "/Guestbook" /> persistence.xml <persistence version = "2.0" xsi:schemaLocation = ...