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

JPA ECLIPSELINK issues SELECT 1

All, Why does EL issues SELECT 1 after every exception ? Is there a way to avoid the issuing of this SELECT 1 as it is hanging/locking the table and the connection is not being released? Please let me know why does this happen and is there a way…
Faz
  • 534
  • 1
  • 9
  • 27
2
votes
0 answers

How to load persistence unit from other jars?

Thanks to all... I've three jars, one with dao logic, other with persistence archive (mappings, persistence.xml and some orm files) and other is the application project. I'm using intellij idea 13 and gradle to develop this application but in the…
2
votes
1 answer

EclipseLink : JPA Entitty Manager

I would like to know what is the autocommit mode by default in JPA EntityManager with EclipseLink, is it autocommit-true or false? If by default it is false, when it is set to true, during the commit/rollback? ie., during…
Faz
  • 534
  • 1
  • 9
  • 27
2
votes
2 answers

EntityManager.merge() not persisting related entities

I am working on a basic JPA Setup with eclipselink. I have an entity which manages the amount in stock of an item. I want to keep track of the stock history of these items, so I want every update to the amount to also create a new history entry. The…
l2p
  • 420
  • 3
  • 9
2
votes
2 answers

Bulk delete in JPA 2.1 using the criteria API

Given the following code that deletes rows in a batch. List list = ... int i=0; for(City city:list) { if(++i%49==0) { entityManager.flush(); } entityManager.remove(city); } The JPA 2.1 criteria API provides…
Tiny
  • 27,221
  • 105
  • 339
  • 599
2
votes
1 answer

How to create a BOOLEAN column in MySql using Eclipselink

In my @Entity class I have defined a boolean property named reservable: @Column(name="reservable", columnDefinition = "boolean default true") private boolean reservable; It is always a column of type TINYINT(1) with default value 1 created.…
du-it
  • 2,561
  • 8
  • 42
  • 80
2
votes
2 answers

Why does JPA update the OrderColumn instead of setting it on creation?

I want to add a NOT NULL constraint to my table on my OrderColumn. Running my code with the constraint I get a constraint violation error. Running without the constraint I see that the row is first inserted without the OrderColumn, and then updated…
Noremac
  • 3,445
  • 5
  • 34
  • 62
2
votes
1 answer

JPA variable persistence units

I'm trying to develop a website using java EE, which will be deployed to a remote server, i am trying to implement JPA into the application. For testing purposes i'd like to create a variable persistence unit, so that on the local deployment, the…
sirius black
  • 97
  • 1
  • 6
2
votes
1 answer

Exception Description: An incompatible mapping has been encountered between [class Entidades.Pais] and [class Entidades.Provincia]

This is the class Provincia with their attributes and I want to make a relationship ManyToOne with the class Pais (a Pais has many Provincia) public class Provincia implements Serializable { @OneToMany(cascade = CascadeType.ALL, mappedBy =…
alex
  • 21
  • 1
2
votes
4 answers

Jpa recursive query

consider the following schema @Entity Class employee{ @OneToMany() List manaagedEmps; @OneToOne employee manager; } how to write a query that get all the managed employee for a certain manager , direct(the list of managedEmps) and…
bob-cac
  • 1,272
  • 2
  • 17
  • 35
2
votes
1 answer

Eclipselink/JPA persist a record once or insert each field separately?

I have a question about persist and merge strategy of eclipselink. I would like to know how eclipselink/JPA inserts and updates records. Is it insert/update one by one into database? or it is saving them in a log file and then flush them to the…
pms
  • 944
  • 12
  • 28
2
votes
0 answers

saving xml datatype using jpa in PostgreSQL

I want to save an xml datatype using jpa in the database(Postgres entity), i have created a converter which read the data from the xml column and create a field from this data . the problem is that eclipse link is mapping the data to var char…
bob-cac
  • 1,272
  • 2
  • 17
  • 35
2
votes
0 answers

Constructor queries on a non-persistent entity unexpectedly fail to supply a Boolean parameter as a constructor argument

There are two tables in MySQL database user_table feedback The relationship between them is intuitive - one to many from user_table to feedback. I need to fetch only a list of selected columns from these tables which are From…
Tiny
  • 27,221
  • 105
  • 339
  • 599
2
votes
0 answers

EclipseLink connection pooling configuration

I am currently implementing the data-layer for an EE application. I am using latest version of JPA, EclipseLink and Spring. The servlet container is VMware vFabric tc (Tomcat). As the title mentioned, how should I do the connection pooling part…
Andrei
  • 3,086
  • 2
  • 19
  • 24
2
votes
1 answer

In a optional OneToOne join scenario, how to get entity A that does not have a B?

I have a class A, that has an optional link to an instance of a B class. For the sake of user-friendliness, I want to filter the output of the grid displaying the instances of the A class, with a switch allowing to display all of As, only As with a…
Psyx
  • 758
  • 1
  • 9
  • 15