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

Is it possible to use OSGi Enterprise 4.x & JPA 2.1 Entity Listener injected via blueprint?

We are in the OSGi world. JPA 2.1 supports injectable EntityListner. And EclipseLink supports JPA 2.1. But the OSGi Enterprise Spec 4.x only supports JPA 2.0. So it seems that injectable EntityListener doesn't work in OSGi, even when EclipseLink…
xwoker
  • 3,105
  • 1
  • 30
  • 42
2
votes
0 answers

Inheritence and Lists in JPA-RS: items don't show up at expected parent element

Given a root class with a property private List items and Base being an abstract class: // omitted properties, Constructor, Getter, Setter, etc. @Entity @XmlRootElement(name = "ROOT") @XmlAccessorType(XmlAccessType.FIELD) public class Root…
Imperative
  • 3,138
  • 2
  • 25
  • 40
2
votes
3 answers

How make both sides of many-to-many relation ships owner?

I have a class Group and a class User where Group and User are many-to-many relation ship If i change the groups of a user and save a user i want to update the groups and vice versa where if i changed a user of a group and save the group i want the…
bob-cac
  • 1,272
  • 2
  • 17
  • 35
2
votes
1 answer

@ElementCollection Map of @Embeddable gets not persisted when field values are equal

I have a problem with inserting elements into an @ElementCollection represented by a Map. When inserting elements with same values, they are not persisted. Given following @Entity and its @Embeddable: @Entity @Table(name = "category", catalog =…
McIntosh
  • 2,051
  • 1
  • 22
  • 34
2
votes
2 answers

EclipseLink JPA in WAS Liberty Profile

Has anyone been able to get the EclipseLink JPA povider working in WAS Liberty Profile with Container Managed Transactions? I have configured my server.xml file with the JPA Container setting to override the default OpenJPA implementations however…
2
votes
1 answer

How to find explain plan of a query through eclipse link

I have a Java application with JPA and eclipse link as backend . I had like to find explain plan of a particular query that gets executed, while the application is running . I know i can check it through sql developer , but i would like to find the…
Sam
  • 1,298
  • 6
  • 30
  • 65
2
votes
1 answer

Error in SPRING JPA using eclipse link POSTGRESQL when executing findBy[NAME]In(List ids)

I got a problem with my SPRING JpaRepository class when trying to use the findByIdIn(List ids), eg i want to pass a list of ids to the native query and expect it to return a list of objects. Maven dep.: spring-data-jpa…
2
votes
1 answer

Rewrite query without right join in jpa

Suppose you have EntityA and EntityB. EntityB has an attribute of type EntityA call it "ea". So you you want to retrieve all EntityAs (related or not with entityB) you could do this way: select ea, b from EntityB b right join b.ea ea In this way…
2
votes
2 answers

Jaxb API Listener

I have created Jaxb Class that contains following listener method but only unmarshall method is working : void afterUnmarshal(Unmarshaller unmarshaller, Object parent) { System.out.println("afterUnmarshal 1"); } void…
hiddenuser
  • 525
  • 2
  • 7
  • 19
2
votes
1 answer

How to set eclipselink cache expiry for all entities?

I'd like to force eclipselink to invalidate the whole cache every hour. There is "expiry" attribute for @Cache annotation but I do not want to specify it on every entity because I want it to be the same for all of them. Is there a way to do it…
Lukasz Lichota
  • 243
  • 1
  • 4
  • 10
2
votes
1 answer

JPQL left outer join on many to many relationship

I'm trying to write a query (using JPQL) to get all tags and how often each has been referenced by all items. The JPQL is: SELECT t.id, t.name, SIZE(t.items) FROM Tag t GROUP BY t.id, t.name ORDER BY t.name ASC Note that some tags are not…
Simon Arsenault
  • 1,241
  • 11
  • 12
2
votes
1 answer

How does EclipseLink merge a collection?

I'm trying to figure out how EclipseLink determines what elements of a collection need to be inserted as part of a merge. For example, this Entity: @Entity(name = "subject") @Table(name = "subject") public final class Subject { ... …
markdsievers
  • 7,151
  • 11
  • 51
  • 83
2
votes
5 answers

How to dynamically generate SQL query based on user’s selections?

This is the same question as: How to dynamically generate SQL query based on user's selections? The only difference is, that I'm interested in seeing solutions also using Java/JPA (+possibly EclipseLink or Hibernate specific extensions). I need to…
tputkonen
  • 5,579
  • 16
  • 60
  • 88
2
votes
1 answer

Reference subclass properties in criteria API

I'm trying to build a query on a superclass, and optionally reference properties of a subclass (if the object is an instance of that subclass). The EclipseLink wiki says I should use superClassRoot.as(Subclass.class).get("subclassField"), but it…
user2633841
2
votes
3 answers

@Enumerated(EnumType.STRING) causes No conversion value provided for the value [0]

I have used this all the time, but now it's no longer working. Really strange. Code snippet: @Column(name = "STAT", length = 16) @Enumerated(EnumType.STRING) private State state = State.LIVE; ... public enum State { LIVE, DELETED; } In the…
user3065706
  • 21
  • 1
  • 3