I am having problems with EclipseLink change tracking in one of my entity classes in a Java SE application. I am using Java 8, JPA 3.0 provided by EclipseLink 3.0.2 and HyperSQL 2.6.1. So far I have kept my implementation provider-independent, so switching JPA providers is an option, although not preferable. This particular entity class has ~10 attributes of the
Tag: eclipselink
JPQL query that give me the highest value
I’m trying to do a JPQL query that give me the highest PK of the PKs in my table (https://drive.google.com/file/d/1_kaklkKdCbhT0-byqCtz6HgfluKKp8J-/view?usp=sharing). Here is my query : The error says that the syntax of my query is wrong. Can someone please help me ? Thank you for your help 🙂 Answer Thank you for your comments ! It allowed me to solve
JPA many-to-many relationship causing infinite recursion and stack overflow error
I’m working on an EclipseLink project in which one user can “follow” another as can be done on social media sites. I have this set up with a User entity (referencing a table called users) which has a list of “followers” (users who follow that user) and another list of “following” (users that user is following). The relationship is defined
JPA/EclipseLink Error in Creating Tables
I am trying to create a table using EclipseLink. The java class being used is :- The relevant persistence xml in question is as follows:- We use the standard method is by implementing the EntityManagerFactory as :- However I keep getting the following errors :- EL Warning]: 2017-04-07 14:04:53.768–ServerSession(1650327539)–Exception [EclipseLink-4002] (Eclipse Persistence Services – 2.6.3.v20160428-59c81c5): org.eclipse.persistence.exceptions.DatabaseException Internal Exception: java.sql.SQLSyntaxErrorException: ORA-00904:
How to use Postgres JSONB datatype with JPA?
Im not finding a way to map the JSON and JSONB datatypes from PostgreSQL using JPA (EclipseLink). Is some one using this datatypes with JPA and can give me some working examples? Answer All the answers helped me to reach the final solution that is ready for JPA and not EclipseLink or Hibernate specifically.
Cleaning up after changing the isolation level in JPA / EclipsLink EntityManager
I’m performing a transaction in JPA (EclipseLink) using a custom transaction isolation level, which I set on the underlying connection of the JPA EntityManager using this code: If I try to reset the isolation level to the old value after having committed the transaction, the underlying connection is null (entityManager.unwrap(Connection.class) returns null). I’m worried, if I just don’t reset the
Insert Null Struct using EclipseLink JPA
I have an Oracle table with an SDO_GEOMETRY column and I am trying to use EclipseLink JPA2 2.6.1 for persistence. My entity class uses a JTS Geometry for geometry objects and I have written a AttributeConverter to convert from a SDO_GEOMETRY to a JTS Geometry. This works well and I can read and write the geometries from the database. The
EclipseLink Query – Select count(*) from student s not working
I am getting following exception :- [13, 13] The left expression is missing from the arithmetic expression. [14, 14] The right expression is missing from the arithmetic expression. Please help me analyse the problem. P.S. If I replace the above query in my code with select * from student s, it is working fine. UPDATE 1 Answer Try using select
Mapping one DB column to two seperate fields using JPA
I’m developing a code generator that have to generate JPA entities from database meta-model files. These model are from home-brewed modeling system which are being used to generate models other than JPA entities. In these models some fields are mapping back to same database column. But it seems like JPA does not like that very much. When I try to
Is EclipseLink MOXy suitable for ridiculously huge XML files?
I’ve spent some enjoyable time with EclipseLink MOXy, figuring out the best way to parse XML into POJOs within Spring. I’ve now been given some XML to parse, and the files go up to a quite unbelievably 750MiB in size. Does EclipseLink MOXy use streaming tech underneath, or will it try to hold the whole document in memory? Answer Note: