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

Converting an Oracle SQL Query to JPQL Query

I have a problem when creating a JPQL query that is derived from a native Oracle SQL query. Some folks told me to use the native query, but I want to leverage the ability of persistence. Here is the native Oracle SQL statement: SELECT a.taxnumber,…
faisal_w
  • 21
  • 6
2
votes
1 answer

JAXB provider Eclipselink MOXy ignores @XmlAccessorType(XmlAccessType.NONE)

I use @XmlAccessorType(XmlAccessType.NONE) in package-info.java for my.package which means JAXB should care only about annotated elements. However, when I run my JUnit test with un/marshalling code for simple POJO MOXy just screams about every class…
Zdenek F
  • 1,649
  • 1
  • 15
  • 27
2
votes
1 answer

JPA-Mapping problem

Reference(http://stackoverflow.com/questions/4688709/problem-in-jpa-mapping) I have a situation where my DB tables are like below, I am wondering how to have JPA mappings for this kind of tables , espacially for the auction_param_values which do not…
tushar
  • 75
  • 4
2
votes
1 answer

Why CascadeType.DETACH is not working in OneToMany relationships of FetchType.LAZY in Eclipselink?

In a standard JEE application with JPA, I have a master entity A that contains One to Many collection of B. The A Entity has the following form: @Table(name = "TABLE_A") @Entity public class A implements Serializable { @Id …
Ilias Stavrakis
  • 753
  • 10
  • 19
2
votes
1 answer

JPA persist new entity with relationship to existing entity

I have two entities with a @ManyToMany relationship, let's take a common example Student and Course, I'm persisting a new course with a list of students, if a new student is in the list it should cascade the new one, if it's existing it should…
PDStat
  • 5,513
  • 10
  • 51
  • 86
2
votes
1 answer

how to query an embedded entity by using a query builder

I've searched quite a time for an answer to this question. Following Codesmell: @Entity public class Person { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) protected Integer id; @Column(nullable = true, length = 50) @Size(max = 50) …
myAces
  • 679
  • 1
  • 5
  • 13
2
votes
1 answer

Nested exception is java.lang.StackOverflowError

I have a class @Entity @Table(name = "movies") @Data public class MovieEntity implements Serializable { ... @OneToMany(mappedBy = "movie", cascade = CascadeType.ALL) private Set ratings; } which maps the…
user8869205
2
votes
3 answers

JPA: How to handle versioned entities?

I have a versioning on an entity as part of its primary key. The versioning is done via a timestamp of the last modification: @Entity @Table(name = "USERS") @IdClass(CompositeKey.class) public class User { @Column(nullable = false) private…
tgr
  • 3,557
  • 4
  • 33
  • 63
2
votes
2 answers

When I run program JPA does not create table in MySQL

Here is my entity named Class: package az.bank.entities; import java.io.Serializable; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import…
2
votes
1 answer

MariaDB Character Encoding

I have just started to port an older MySQL/Spring/Eclipselink project to MariaDB. I am encountering an issue with table creation that can be demonstrated as follows: MariaDB [spasm]> CREATE TABLE Configuration (ID BIGINT NOT NULL, Attribute…
skyman
  • 2,255
  • 4
  • 32
  • 55
2
votes
2 answers

Problem in managing bi-directional relationships in JPA: removing from a collection

My domain model has a self-referencing bi-directional relationship with relationship management done in the entity: @Entity public class Users implements BaseEntity, Serializable { @Id private String username; …
Theo
  • 3,074
  • 7
  • 39
  • 54
2
votes
1 answer

Criteria API not in @ElementCollection

With Permission being an enumeration, is it possible to select all users without a certain permission using JPA Criteria API: @Entity public class User { @ElementCollection @CollectionTable(joinColumns = @JoinColumn(name = "USER_ID")) …
Imperative
  • 3,138
  • 2
  • 25
  • 40
2
votes
1 answer

How to pass to Spring parameter by @Query, sql isn't working

I'm using Spring 4, PostgreSQL and EclipseLink. I would like to build a query to the DB, passing two parameters. I'm having these troubles : Call: SELECT n.id, n.volume, n.numero FROM numberentity n WHERE n.volume = :volume AND n.numero =…
Pocho
  • 51
  • 3
  • 12
2
votes
0 answers

payara 4.1.1.171 :: ecliselink jpa issue with case when condition

On payara JPA named query with CASE and WHEN condition causes illegal argument exception. This was working fine with glassfish3. EclipseLink bug id https://bugs.eclipse.org/bugs/show_bug.cgi?id=462663 Payara Github…
Vikram Alva
  • 190
  • 1
  • 8
2
votes
1 answer

JPA and Java SE - Table not created for Entity class, due to additional convenience methods

I am currently writing a Netbeans platform application for persistence I use JPA 2.1 and eclipse link as provider. I have the following entity class: import java.util.UUID; import javafx.beans.property.SimpleStringProperty; import…
Alexander
  • 21
  • 4