This tag is for questions about the version 2.0 of the Java Persistence API.

learn more… | top users | synonyms (1)

0
votes
1answer
9 views

JPA : Count with predicate on MapJoin

I have a problem with a criteria count query with a MapJoin ! In fact it doesn't work ! Here is my code : public long countItems(final String title, final String url) { CriteriaBuilder builder = ...
0
votes
1answer
15 views

Hibernate persists referenced entities without cascade=PERSIST

I have a table of children each of which can have a set of different toys. There is a table that stores the code of each available toy. @Entity public class Child implements Serializable { @Id ...
1
vote
0answers
7 views

JPA Hibernate bulk/batch update in Spring MVC

I am new to Spring MVC and not much idea with JPA as well. all I want to do is to update a list of records and its working well when I loop through the list and call update on DAO. But I dnt want to ...
0
votes
0answers
8 views

Query.setparameter using TemporalTipe.Time

I wanna do SELECT e FROM Pedidos e WHERE e.diaPedido = :diaPedido AND e.horaPedido = :horaPedido. When I write parameters use query.setParameter("diaPedido", fechaEscogida, TemporalTipe.DATE) and ...
1
vote
1answer
11 views

Override JPA Mapping in leaf classes

I am using JPA 2 and my problem is about inheritence and overidde Mapping in JPA 2. I have one Abstract Class [AbstractCompte] and two leafs classes [Compte , CompteTmp]. I want to redefine the ...
1
vote
0answers
15 views

Change hibernates behaviour on nullable = false and unique = true with oracle 10+

Since hibernate does not work correctly (in my opinion ;)) on fields with @Column(nullable = false, unique = true) and oracle DB, I want to change hibernates behaviour with this. The problem is that ...
0
votes
0answers
5 views

Propagating @GeneratedValue to @Embeddable composite key on ManyToMany relationship

I have a ManyToMany relationship like A -> C (1:N) and B-> C (1:N) and I would like to save a new instance of Entity A and C at same time but I can't. When I try to save both entities at same time ...
0
votes
3answers
23 views

In JPA, having a many-to-one as primary key throws referential integrity constraint violation

I have defined the following entities: @Entity public class Child implements Serializable { @Id @ManyToOne(cascade = CascadeType.ALL) public Parent parent; @Id public int id; } ...
0
votes
1answer
13 views

Hibernate cascading throws Exception on save

I'm trying to insert an object in the database. It contains a collection which also should be inserted, but I'm getting the exception below: SQLServerException: Cannot insert the value NULL into ...
0
votes
0answers
11 views

JPA 2 criteria with multiselection and join on polymorphic entity possible?

My task is to migrate a dynamic search query from sql to jpa criteria api. The query returns informations about tasks that are collected from various associated entities. In a simplified form the ...
1
vote
1answer
16 views

Efficient cache-aware fetching of multiple entities given their ids

This is JPA2 running on Hibernate. I want to retrieve multiple instances of the same entity type, given their ids. Many of them will already be in the persistence context and/or second-level cache. ...
0
votes
0answers
19 views

Eclipselink 2.5 metamodel creation

With Eclipselink 2.5 the metamodel creation doesn´t works as with previous versions. In previous version we added the CanonicalModelProcessor (see below) and the metamodel is automatically generated. ...
0
votes
1answer
22 views

Unknown column 'JDODETACHEDSTATE' getting added by default while inserting into Google Cloud SQL

I am trying to insert records into Google Cloud SQL using JPA 2.0 in Google web application. I am getting the following error. [EL Info]: 2013-07-07 ...
2
votes
1answer
27 views

jpa @postpersist @postupdate only after transaction commit

I'm inserting/updating 3 tables while using manual transaction. I want to insert into an history table right after the transaction was commited. that means that there were 3 em.persist actions (for ...
0
votes
1answer
18 views

Vaadin 7 createEntityItem and addentity to JPAContainer Eclipse shows syntax error in code

I am trying to add a new item using formlayout form to JPAContainer in vaddin 7. I use this code snippet: String paramDAO = "PersonDAO"; //this parameter can be acquired from url, http ...

1 2 3 4 5 129
15 30 50 per page