About Persistence Context

forum_thread

@Transient

Hello, I have a persistent class which looks something like this: @Entity public class Test { private String string; private Date date; @Transient private boolean test; // getters/setters } When I persist the class the transient 'boolean test' is stored in the database, maybe I am doing it wrong but I expect...   my persistence class screenshot of explorer after persistence class ... Use ctrl + right click to open the browser context menu in the editing area (e.g. for using a browser spell ...

 
forum_thread

Visibility of changes in Transaction is not visible to a JPA QL Query

I have two simple Entities ( see attachment ) and a simple SLSB with container managed transactions which is called by a trivial servlet. Inside a UserTransaction I add a number of items then check to see that they have been added ... = - 1 ; try { InitialContext context = new InitialContext ( ) ; javax. ... ) ; } catch ( javax. persistence . NoResultException ex ) { return - ...

 
forum_thread

Jboss 6 persistence.xml startup error

Hi,   I'm trying to migrate a small EJB 3.1 project from Postgres to ObjectDb to test out feasibility, but I keep getting stuck on setting up the persistence.xml on JBoss 6 AS.   Here is my setup: ------- Start persistence.xml ------- ... feasibility, but I keep getting stuck on setting up the persistence.xml on JBoss 6 AS. Here is my setup: <persistence version = "2.0" xmlns = ... defined a jta-data-source for a JTA enabled persistence context named: testUnit at ...

 
issue

Weird issue with variable naming

hi, ... java. util . Map ;   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 ...

 
manual

SELECT clause (JPQL / Criteria API)

Explains how to use the SELECT clause and projections in a JPA/JPQL query.... that become managed by the EntityManager javax.persistence.EntityManager JPA interface Interface used to interact with the persistence context. See JavaDoc Reference Page... em : TypedQuery ...

 
api-jpa

merge(entity)

Merge the state of the given entity into the current persistence context.(Method of javax.persistence.EntityManager)

 
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

can't get HashMap out of the database

I'm trying to persist an Entity containing a HashMap. It stores the data in the database OK, but the map is always empty when I get the entity out of the database again. I've reproduced this problem in a simple variation of the Guestbook tutorial: Guest class: ===================== ... ) { ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext ( ... are available, unless you use a Container-managed Extended Persistence Context, as discussed in this forum thread . In ...

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