About Persistence Context

manual

JPA Lifecycle Events

Explains how to use JPA lifecycle events (client side triggers) with callback methods and listener classes.... with empty implementations: @Entity javax.persistence.Entity JPA annotation Specifies that the class is an ... Interface used to interact with the persistence context. See JavaDoc Reference Page... or Query ...

 
forum_thread

Eclipse plugin problem (using ObjectDB as a separate bundle)

Hello support, I have seen multiple attempts to correct similar errors as in the title above - the latest in the 2.2.8.01 release of objectDb. However I still get this error.   Here is my scenario (Groovy 1.8 and Eclipse 3.6) used. I have a com.epimss.lab.data.toxicology.TherapeauticDrugScreenRqst. Nested in this class are the following two classes: com.epimss.lab.data.misc.OtherRqst and com.epimss.lab.data.misc.RequestDateAndNumber. ... data to ObjectDB. For my first attempt at persistence, everything is persisted as expected - I used ObjectDB explorer to ... Eclipse v3.62 e4 plugin demonstrating problem with persistence dependencies.png (URL and Eclipse update sites for ... Use ctrl + right click to open the browser context menu in the editing area (e.g. for using a browser spell ...

 
issue

com.objectdb.o.InternalException: java.lang.ArrayIndexOutOfBoundsException: null:

The following error appears under and extended persistence context, and with creation, configuration and wiring code that is known to work perfectly with EclipseLink+Glassfish: SEVERE: Unexpected internal exception ... The following error appears under and extended persistence context, and with creation, configuration and wiring code that is known to work ...

 
forum_thread

mappedBy problem

If I put the mappedBy element to the @OneToMany, the owned side (the many side) will never persist ! for example @Entity public class Employee { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) public Long id; public String name; @OneToMany(targetEntity=Address.class,mappedBy="employee") public List<Address> addresses; }   @Entity... Use ctrl + right click to open the browser context menu in the editing area (e.g. for using a browser spell ...

 
issue

New entity objects are duplicated on merge cascading

When merge is cascaded to a new entity object that has not been persisted yet - it becomes persisted twice. This was demonstrated by a Java EE application in this forum thread but may be reproduced also in a simple console test case: ... import java. util . *;   import javax. persistence . *;   @ Entity public class I110 ... Use ctrl + right click to open the browser context menu in the editing area (e.g. for using a browser spell ...

 
forum_thread

Query on Embedded Primary Key?

Hi, I am trying to use Embedded Primary Key - but seems I can't retrieve them correctly with the query below - the query seem to work fine for other field (in the code = primkeycopy). The error I get when is below - it complains about a casting issue. Let me know how to fix it - Thanks  EKK   ... import java. util . List ; import javax. persistence . Embeddable ; 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

Delete me

Why does the below code not enforce unique restrictions?   Person.java ... javax. jdo . annotations . *; import javax. persistence . *;     public final class F864 { ... with keeping the EntityManagerFactory in the servlet context. Maybe you had an old  EntityManagerFactory in the ...

 
forum_thread

ID format in objectdb 2.x for JDOHelper.getObjectId

Hi, I am trying to upgrade the objectdb from 1.x to 2.x. I installed and configured as per object db tuotrial. I am just wondering, in objectdb 1.x, when i am tring to get the object id for a persistable object, i am getting an integer as a result e.g Object obj = JDOHelper.getObjectId(logTestRunImpl) used to return suppose 1 obj.toString() = 1 but the same code when i am trying to execute for the same object in object db 2.x, i am getting ... Use ctrl + right click to open the browser context menu in the editing area (e.g. for using a browser spell ...

 
tutorial

Step 2: Define a JPA Entity Class

Explains how to define a JPA entity class in an Eclipse Web Application.... import java. sql . Date ; import javax. persistence . Entity ; import javax. persistence . GeneratedValue ... ordinary Java class. The next step is adding a context listener class that will manage a JPA's EntityManagerFactory ...

 
forum_thread

JPA vs JDO - which is more efficient for OneToMany queries?

I'm curious about the trade offs between JDO and JPA. Seems to me that JDO will perform better and be statically typed. For example: Assume there are Customers and Orders.... See: http://www.objectdb.com/java/jpa/persistence/store#Global_Cascading_Persist and ... Use ctrl + right click to open the browser context menu in the editing area (e.g. for using a browser spell ...