Questions tagged as 'jpa-2.0'

1
answer

Exception StackOverflowError occurring in @ManyToMany relationship with JPA

I'm having a problem in a @ManyToMany entities relationship. When I try to do a simple query on the entity that contains the @ManyToMany stackOverflow occurs. My rule is simple: My entity ApplicationClientVO can access N WebServiceVO and a We...
asked by 09.06.2014 / 18:40
1
answer

Clear Target in JSF + JPA + Richfaces Projects

How can I clean Targets generated from the project when we deploy deploy to JBoss?     
asked by 05.02.2014 / 18:26
1
answer

Subquery in select clause with Criteria JPA

I was researching how to make a subquery in the select clause with Criteria of a select of this type: SELECT tabela1.*,tabela2.*, (SELECT MAX(tabela5.AtrDatatabela5) FROM .Tabela3 AS tabela3 INNER JOIN Tabela4 AS tabela4 ON tabela4.AtrId...
asked by 29.03.2016 / 14:23
1
answer

JPA / Hibernate problem with concurrency and persistence in JRE

I'm working on a project to create a simple server running on Java SE. I am using JPA + Hibernate to perform persistence, however concurrent routines are a problem. I'm wasting a lot of time trying to solve the problems generated by Hibernate wi...
asked by 16.04.2015 / 05:50
0
answers

JPA (hibernate) automatically update entities [closed]

I have the following question: I realized that when I use JPA (Hibernate) + Spring in a JSF application (PrimeFaces) my entities are not updated immediately when registering, for example, I have a User when doing the same everything happens norm...
asked by 10.02.2015 / 20:41
2
answers

Doubt how to leave a single attribute - JPA

I am creating an entity, and I have a CPF field and this field that is unique, how to map this CPF field? My entity. @Entity public class Client { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Long codigo; private Stri...
asked by 20.03.2017 / 18:25
2
answers

Call Stored Procedure with JPA 2.0

I need to call the following procedure below, so the company projects use JPA 2.0 and all the examples I encounter are for JPA 2.1 + . prc_performance_vendas_obter(vdataini => :vdataini, vdatafim => :vdatafi...
asked by 06.03.2017 / 21:27
2
answers

How to do a search using jpa with searching for the foreign key

I am trying to perform a search with jpa, I have the following query: String jpql = "Select m from Medicamento m where m.usuario_id = ?1"; But this error occurs: Exception in thread "main" java.lang.IllegalArgumentException: An exception...
asked by 26.08.2016 / 01:34
1
answer

Mapping the same entity class to two banks

Good afternoon Terrans, I'm a beginner in Java and I have the following situation. I have two databases, where I will transfer the records from one bank to another. Is it possible to have a Entity class mapped by the two banks? Comments:...
asked by 25.08.2016 / 23:01
1
answer

Duplicate value in the bank when inserting new users with an already used Role (Spring-Security)

Hello I'm creating a simple web application with SpringMVC and Spring Security. I made the User and Roles class as follows: @Entity public class Usuario implements UserDetails { private static final long serialVersionUID = 1L; @Id pr...
asked by 06.02.2016 / 03:57