Questions tagged [eclipselink]

EclipseLink delivers a comprehensive open-source Java persistence solution. EclipseLink focuses on standards (JPA, JAXB, SDO) with advanced features, performance and scalability for enterprise software developers across data sources, formats, and containers.

EclipseLink delivers a comprehensive open-source Java persistence solution. EclipseLink focuses on standards (JPA, JAXB, SDO) with advanced features, performance and scalability for enterprise software developers across data sources, formats, and containers.

5055 questions
2
votes
0 answers

JPA: How to automatically generate shadow tables (history)

I'm using EclipseLink's History feature. As far as I understand there is currently no support for actually creating the shadow table. I'm using JPA 2.1 automated schema generation for all my base tables. Works fine. Now I'm looking for a way to…
peterh
  • 18,404
  • 12
  • 87
  • 115
2
votes
1 answer

EclipseLink: "Missing class for indicator field value" without inheritance

I have a problem using Moxy to convert a JSON String to an XML Object. Here is the exception I get when I do this conversion: Exception [EclipseLink-43] (Eclipse Persistence Services - 2.6.2.v20151217-774c696):…
2
votes
1 answer

JPA Criteria join query

I have written a complex JPA 2 Criteria API query (my provider is EclipseLink), where I find myself re-using the same subquery over and over again. Unless the DB (Oracle) does something clever, I think that the subquery will be executed each time it…
Markos Fragkakis
  • 7,499
  • 18
  • 65
  • 103
2
votes
4 answers

How to use JPA EclipseLink to connect to the DB in a multi layer environment (REST + EJB + Core)?

I am using Glassfish v3 server. Usually the DB connection with EJB3 + JPA (Eclipselink) is done through injection, with @PersistenceUnit or @Persistencecontext. However, there are 3 layers in my App : Core (contains business logic, entities,…
spiritoo
  • 451
  • 5
  • 15
2
votes
1 answer

JPQL / HQL fetch join syntax for compatibility with EclipseLink & Hibernate

I would like to be able to swap my JPA implementation between EclipseLink & Hibernate with a simple property change. I can do this ok but what is causing me problems is the named query validation. Using EclipseLink I have to write fetch joins like…
timbotoolman
  • 65
  • 2
  • 6
2
votes
0 answers

What is the best way of extracting property values from JPA persistence.xml if you want it to work for EclipseLink too?

I realize it is always possible to parse the persistence.xml myself, but I would like to know if there is any better way to extract the properties from persistence.xml, for example the values of the database driver/url/user/password, in a way…
Pelle
  • 137
  • 2
  • 6
2
votes
1 answer

DDL generation with EclipseLink on Oracle RDBMS: Generate varchar2 fields with character length semantics

I use eclipselink.ddl-generation.output-mode=database to generate the database schema. Can the generated SQL use character length semantics for generation of varchar2 fields? Enhance generated DDL of EclipseLink seems to related and an answer to…
Drunix
  • 3,313
  • 8
  • 28
  • 50
2
votes
4 answers

eclipselink doesn't fetch list

there are two entity classes: @Entity public class Place implements Serializable { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Long id; @OneToMany(mappedBy = "place") private List events = new…
ryskajakub
  • 6,351
  • 8
  • 45
  • 75
2
votes
2 answers

jpa eclipselink subquery in from clause

I read here https://wiki.eclipse.org/EclipseLink/UserGuide/JPA/Basic_JPA_Development/Querying/JPQL#Sub-selects_in_FROM_clause that eclipselink support subquery in from clause but when i'm using this query queryString2="SELECT NEW…
Billydan
  • 395
  • 1
  • 7
  • 25
2
votes
2 answers

how to import csv file into mongodb in Java

I'm using EclipseLink as API for mongodb. I need to update my database each time from given csv files. Is there any way to import a CSV file into MongoDB with java? or is it possible to execute a raw mongo command like this in java…
shohreh
  • 526
  • 9
  • 20
2
votes
1 answer

Entity is not persisted using EclipseLink

I'm learning JPA. In the code below I'm trying to persist Point, then list Points to check and it turns out that it haven't been saved. Why? Thank you! PersistenceProvider provider = new PersistenceProvider(); EntityManagerFactory emf =…
greenmarker
  • 1,599
  • 1
  • 21
  • 29
2
votes
1 answer

EclipseLink: Checking current transaction isolation level

I have a standalone Java application that uses EclipseLink 2.0.1. It is configured by a persistence.xml, and then does something like: final EntityManagerFactory emf = Persistence.createEntityManagerFactory("xy"); final EntityManager em =…
Chris Lercher
  • 37,264
  • 20
  • 99
  • 131
2
votes
2 answers

Is there any tool to validate @XmlPath annotations?

Is there any tool to validate @XmlPath annotations used from MOXy JAXB at a specific xml file at compile time from Eclipse or IntelliJIdea java framework or something else?
curious
  • 1,524
  • 6
  • 21
  • 45
2
votes
2 answers

Can I set the schema before creating the EntityManager?

I need to use multiply persistence units with different properties (in my case MySQL and Oracle database). In persistence.xml I define two different "persistence-unit"s and list only the entity classes there. Properties could be set in…
Andreas L.
  • 2,805
  • 23
  • 23
2
votes
3 answers

Fetch results using JPA Criteria Builder where contains numeric fields only where attribute having alphanumeric values in MySQL

I wanted to know how to query with JPA CriteriaBuilder where the attribue userCode of type String represents a number. I'm having : Id name userCode 1 ABC ABCD_123 2 XYZ ABC_EFGH 3 TEST 7845 4 TEst2 85245 Now i…
Ashish Ratan
  • 2,838
  • 1
  • 24
  • 50