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
1 answer

Changing JPA (EclipseLink) Java serialization to using Jackson / json

I'm interested in replacing the default java serialization in EclipseLink JPA to json using the Jackson engine. Is there a property where I can set the serialization engine for all my setup? I know EclipseLink support serialization of json with MOXY…
Avner Levy
  • 6,601
  • 9
  • 53
  • 92
2
votes
2 answers

jpa cascading deletes reverse relationship

My question is about cascading deletes with JPA and Eclipselink. I would like to model a simple relationship between two entities: A and B. B references A through a property ref2a (in DB terms B.ref2a is connected to A.id through a foreign key with…
D-FENS
  • 1,438
  • 8
  • 21
2
votes
3 answers

Get JDBC connection from EntityManager

I've a web application that uses EJB 3. Persistence is managed by container so the entity manager is injected. @PersistenceContext(name="Ejbs", type=PersistenceContextType.TRANSACTION) private EntityManager em; I need in one of my EJB methods to…
Eduardo
  • 1,169
  • 5
  • 21
  • 56
2
votes
1 answer

JPA eclipselink global batch fetch?

when joining I get one select per row. Solution is batch fetch but I dont want that annotation everywhere... http://eclipse.org/eclipselink/documentation/2.4/jpa/extensions/a_batchfetch.htm Why do I even need this? One select per row is awful...…
Karl Kildén
  • 2,415
  • 22
  • 34
2
votes
2 answers

Forcing a method to be non-transactional in JPA (Eclipselink)

I am developing an application using Eclipselink and as part of the app I need to be able to manipulate some of the objects which involves changing data without it being persisted to the database (i merging/changing objects for some batch generation…
rhinds
  • 9,976
  • 13
  • 68
  • 111
2
votes
2 answers

How to call function using EclipseLink

How to call an Oracle function which returns sys_refcursor using EclipseLink? There is a documentation which states about calling a function, but not sure how to call a function which returns…
Jacob
  • 14,463
  • 65
  • 207
  • 320
2
votes
2 answers

Unable to acquire a connection from driver [null], user [null] and URL [null]. / EclipseLink 1.2 / Spring 2.5.6 / OSGI

I try to deploy a project where EclipseLink JPA is used as ORM tool on an OSGI platform. The project works fine when running outside of a OSGI container. Version used : Spring 2.5.6, EclipseLink 1.2.0 Unfortunately, I get this error on the OSGI…
2
votes
0 answers

Externalize database connection (persistence unit) details in Tomcat 7 with EclipseLink

I'm joining a project which uses Tomcat 7 EclipseLink as JPA provider (could probably be changed) This project is deployed to many different environments each with a different database connection. Currently all connection details for all databases…
Marcel
  • 4,054
  • 5
  • 36
  • 50
2
votes
3 answers

JPA CriteriaBuilder and Substring

I have a CriteriaBuilder where I am trying to get characters starting from 0 to 10. However I am not able to get the desired output. CriteriaBuilder cb = em.getCriteriaBuilder(); CriteriaQuery cq = cb.createQuery(Emp.class); …
Jacob
  • 14,463
  • 65
  • 207
  • 320
2
votes
1 answer

EclipseLink: onetomany relationships with lazy loading loaded with serialization

I'm facing a problem with eclipselink under websphere 7.0 in a clustered environment. When my entity is serialized every 1-n relationship lazy is loaded, even if the entity is detached. How can I avoid this behavior, without having to use DTO? Thank…
Manuele Piastra
2
votes
0 answers

How can I update a row which EclipseLink uses for @TableGenerator or insert a new row into that table?

I want to integrate a JDBC based application into an Java EE application running in GlassFish which uses EclipseLink JPA 2.5 with MariaDB (a MySQL clone). The JDBC based application imports data from flat files into some database tables and requires…
Jemolah
  • 1,962
  • 3
  • 24
  • 41
2
votes
2 answers

How do I properly setup SQL logging for EclipseLink?

I want to see the generated SQL statements from EclipseLink. The persistence.xml contains the following properties:
Jemolah
  • 1,962
  • 3
  • 24
  • 41
2
votes
2 answers

EclipseLink's @UuidGenerator leads to NullPointerException

I've tried to start using EclipseLink's @UuidGenerator annonation for ID generation but it failed with NPE. I'm using Java EE 6 + GlassFish 4.1. Entity were created from servlet. EclipseLink version is 2.6.0-M3. Simple long id…
Sogawa-sps
  • 147
  • 10
2
votes
1 answer

Spring + JPA: object does not get fetched from the database

I am implementing an online shop. I have the following code for saving an order: @Service @Transactional public class OrderServiceImpl extends GenericServiceImpl implements OrderService { @Inject private ItemRepository…
2
votes
2 answers

Database agnostic query to get the row number based on the primary key

Let country be a table in an RDBMS system. Its columns are intuitive. Therefore, I do not go in depth nor they are required to know. I needed SQL statements like the following at many places through out the application while using JPA (through…
Tiny
  • 27,221
  • 105
  • 339
  • 599