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
2 answers

Sum Time field values in JPA

I'm having a problem with aggregate SUM function in JPA (Eclipselink v.2.1.2) which is executed on MySql database. I need to sum values in a field of type 'TIME'. But, executed query returns wrong result. For example, I have two values ('04:15:00'…
Vladimir
  • 305
  • 1
  • 7
  • 16
2
votes
2 answers

JPA getResultList much slower than SQL query

I have a (oracle)table with about 5 million records and a quite complex query which returns about 5000 records of it in less than 5 seconds with a database tool like toad. However when I ran the query via entityManager(eclipseLink) the query runs…
Thomas Seehofchen
  • 367
  • 1
  • 5
  • 14
2
votes
0 answers

How to call in JPA a stored procedure which takes 'TABLE OF NUMBER' as a parameter

Oracle SQL: create or replace TYPE some_array AS TABLE OF NUMBER; create or replace procedure custom_procedure(array_param IN some_array) (...) I'm using org.eclipse.persistence 2.x as an implementation of JPA so theoretically it should support…
Chris Jaga
  • 389
  • 4
  • 17
2
votes
2 answers

JPA Embedded and BeanValidation

@Entity public class Foo { [...] @Valid @Embedded private Poo poo; } @Embeddable public class Poo { @NotNull private Double value; @NotNull private Double value2; [...] } I need to save the class Poo as…
Marco Queiroz
  • 69
  • 2
  • 12
2
votes
2 answers

@SpringBootTest interferes with EclipseLink dynamic weaving

My company is developing a web application using Spring Boot, Spring MVC, JPA with EclipseLink and dynamic weaving. My task is to prepare implementation of UI and integration tests spinning up the application using JUnit and @SpringBootTest and…
cdpm
  • 41
  • 6
2
votes
1 answer

Prevent JPA Entity from being persisted

I am trying to prevent an entity from being persisted without throwing an exception. Lets say that we have a table holding address rows called Address. In the Address Entity I have the following method: @PrePersist @PreUpdate private void…
2
votes
2 answers

Assigning NULL value to the persistent column

I am new to JPA so pardon if my question seems to be trivial. I have an entity named customer @Entity("CUSTOMER_DETAILS") public class Customer { @Id @Column(name = "customer_id") private String customerId = null; @Column(name…
Anmol Bhaskar
  • 117
  • 2
  • 6
2
votes
1 answer

JPA, Eclipselink - Relations are deleted on new transaction

I'm building a small eclipse rcp with a little bit of JPA. Now something strange happens: I create some TopCategories with some SubCategories, this works as intended. The inserts are printed in the log. I close my application and now the problem…
onigunn
  • 4,730
  • 10
  • 58
  • 89
2
votes
1 answer

How specify a JPA criteria API with "MEMBER IN" and a many-to-many relationship in a mapped superclass?

I would like to query ConcreteEntity where AUser user IS MEMBER of ConcreteEntity.createdBy with @Entity public class AUser implements Serializable { @Id @GeneratedValue private Long id; private String…
Kalle Richter
  • 8,008
  • 26
  • 77
  • 177
2
votes
2 answers

Generating schema with default minOccurs using MOXy

I'm trying to use EclipseLink MOXy 2.1.2 and Java 1.6 to generate a schema based on my domain classes, following this example: http://wiki.eclipse.org/EclipseLink/Examples/MOXy/JAXB/GenerateSchema However there is an issue with the default minOccurs…
Mart
  • 21
  • 2
2
votes
2 answers

MATLAB finds persistence.xml for eclipselink only within the first few seconds

This is a continuation of the issue described in Using eclipselink in Java code run from MATLAB and is similar to the issue described in Java JPA Class for MATLAB, but the accepted solutions described there have not completely solved the issue. I am…
Sam
  • 322
  • 2
  • 11
2
votes
1 answer

Change entity type with Eclipselink / JPA?

I'm aware of similar questions, but they were asked and answered in the scope of Hibernate. I've got the same problem, but I'm using Eclipselink and wondering if there are better or alternative solutions to what was proposed for Hibernate. To recap…
Bob
  • 5,510
  • 9
  • 48
  • 80
2
votes
1 answer

Why are bulk inserts with JPA/Eclipselink/Texo much(!) slower than with pure JDBC insert?

I have a large number of classes that have been generated and annotated using the EMF/Texo combination. I persist them on a SQL Server Database using JPA/Eclipselink. This works fine, however the performance is horrible when a high number of objects…
KayleeTheMech
  • 489
  • 1
  • 4
  • 17
2
votes
2 answers

JPA/Eclipselink poor performance batch update entity on ManyToOne relationship changes

I have problem with batch writing in eclipselink when i update an entity properties which link to other entity. I have a Cardholder entity with @ManyToOne relationship with Card Entity. @Entity @Table(name = "...") @NamedQueries({...}) public class…
Andoko
  • 21
  • 2
2
votes
0 answers

how to set @SequenceGenerator schema in multitenancy

I'm facing this issue, my entity Profile is : @Entity @Table(name="profile") @Multitenant(value=MultitenantType.TABLE_PER_TENANT) @TenantTableDiscriminator(type=TenantTableDiscriminatorType.SCHEMA,…
alveomaster
  • 1,681
  • 2
  • 12
  • 21