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

JAXB-Eclipselink: XmlRootElement and inheritance

Using Eclipselink/MOXy 2.3 i have following usecase in marshalling to XML: abstract class MyAbstract { } class MyImpl extends MyAbstract { } class A { private MyAbstract myAbstract; // MyImpl is behind this public MyAbstract…
quaylar
  • 2,617
  • 1
  • 17
  • 31
2
votes
1 answer

JPA, Eclipselink, Many-to-many: dependent collection is not updating

I have one many-to-many relationship in my model. There are two entities, Emergencies and Crews (crews can attend many emergencies, and vice versa). Code parts responsible for the relationship look as follows: @JoinTable(name =…
phil_g
  • 516
  • 6
  • 13
2
votes
1 answer

EclipseLink MOXy @XmlPath support for predicate inequality

Having previously posted EclipseLink MOXy @XmlPath support for axes/parent I'm still working with @XmlPath annotation and it appears to me predicate inequality isn't supported? @XmlPath("node[@attr != 'a']") Also valid for me would be to check for…
mikeapr4
  • 2,830
  • 16
  • 24
2
votes
1 answer

JAXB-Eclipselink: Mapping abstract "getter" to XML

I am using the EclipseLink implementation (2.3) of JAXB to map POJOs to XML and encountering a problem with following usecase: public abstract class A { public abstract Set getX(); // There is no setter } public class B extends A { …
quaylar
  • 2,617
  • 1
  • 17
  • 31
2
votes
2 answers

Eclipselink no suitable driver found for jdbc:mysql

The error No suitable driver found for jdbc:mysql://localhost:3306/mazedb The complete error INFO: [EL Info]: 2012-01-03 23:27:35.522--ServerSession(11375975)--EclipseLink, version: Eclipse Persistence Services - 2.3.0.v20110604-r9504 INFO: [EL…
TGM
  • 1,659
  • 10
  • 30
  • 45
2
votes
2 answers

Correct way to remove object from @ManyToMany list

I created relation @ManyToMany with the same entity. Here is my entity: @Entity @Table(name = "user") public class User extends BaseEntity implements Serializable { ... @ManyToMany(cascade = CascadeType.ALL) @JoinTable(name = "table_friends",…
galica
  • 137
  • 1
  • 2
  • 10
2
votes
1 answer

Tracking last change to an object with @Version annotation in EclipseLink

Using JPA with EclipseLink, I would like to track the timestamp of the last update made to an entity instance. Assuming that this would be easy to combine with optimistic locking, I defined the entity as follows: import…
Martin Dirichs
  • 113
  • 1
  • 11
2
votes
2 answers

How to detach an entity (JPA 2.0/EclipseLink/JBoss)

I need to detach some entity objects from the database to make them unmanaged. I use EclipseLink persistence provider, which method EntityManager.detach() is exactly one I need. The problem is that JBoss throws at runtime following exception (when…
Eadel
  • 3,797
  • 6
  • 38
  • 43
2
votes
1 answer

EcipseLink JPA 2.0 is refresh()/flush() needed?

I have weird behavior of inconsistent data returned from my DB when there are 150+ users connected to our Web-app. My EJBs connect to MySQL through mostly Netbeans 7.0 generated code, customized a bit for re-usability. What happens is that every so…
JScoobyCed
  • 10,203
  • 6
  • 34
  • 58
2
votes
1 answer

Querying an entity with filters on a OneToMany attribute gives a weird result

I use EclipseLink for 9 months and so far no problem. Since I have the need to query an entity with a OneToMany attribute, it's all the contrary. It gives me a strange result. I have simplified my entities until the maximum but the problem…
davidxxx
  • 125,838
  • 23
  • 214
  • 215
2
votes
1 answer

eclipselink J2SE fetchType LAZY efficient use

I'm developing my first EclipseLink J2SE project, and wondering if there's an efficient way to take benefit of the lazy loading even after accessing an object. Here's an example to illustrate the problem. suppose we have these 2…
George Casttrey
  • 427
  • 1
  • 6
  • 16
2
votes
1 answer

JPA Update Query -- Why won't my transaction work?

I am having a performance problem with JavaDB (Derby) writing transactions. Each transaction takes more than 500ms and I might have hundreds of thousands a day. I am expecting to deploy on MySql and I don't know if I am going to have the same…
AlanObject
  • 9,613
  • 19
  • 86
  • 142
2
votes
1 answer

List wrappers in JAXB MOXy

I am declaring a List object property with: @XmlRootElement(namespace = "...") @XmlType public class Test { private List myList; @XmlElementWrapper(name = "myListWrapper") @XmlElement(name = "myList") public List
Sergio
  • 8,532
  • 11
  • 52
  • 94
2
votes
1 answer

Is it possible to use @XmlInverseReference where object and property are of same type?

I'm using the MOXy JAXB implementation and make quite extensive use of the @XmlInverseReference annotation. However, I've recently encountered a scenario where this approach doesn't seem to work. If I have a class containing a field with a property…
Fil
  • 2,016
  • 18
  • 29
2
votes
1 answer

JPA reads but doesn't persists

My Java Web App reads data from database but when I try to write something, JPA says ok, but the database does not change. I call "merge" method and the data are not being saved on database, only in memory. I can do a SELECT direct into database and…
André
  • 444
  • 1
  • 7
  • 13