Questions tagged as 'jpa'

0
answers

Inject EJB in spring bean

I'm working on a Java EE + Primefaces + JPA project with EJB. In the authentication part I decided to use Spring Security, but I'm having trouble getting the EJB inside the Spring controller. I found some tutorials, but I did not succeed. If som...
asked by 11.07.2017 / 19:25
1
answer

Object is not updated

In my stream it looks like this: I already have an object stored in the database. When loading my page, these objects are fetched in the database, treated to be displayed. Objects arrive in a List ( List ), that is iterated by f...
asked by 31.03.2017 / 23:58
2
answers

Delete data with the @ManyToOne relation

How do I delete data with the @ManyToOne relation? It does not give an error, but does not erase the data in the database. My class Pedido : public class Pedido extends GenericDomain{ @Column(nullable = false) private...
asked by 21.12.2016 / 12:51
0
answers

Select * from Table and No Select * from EntityName - JPA JAVA

My query was built like this, but when it asks: @Query(value = "SELECT CT.id FROM CursoTurno AS CT LEFT JOIN Curso AS C ON C.id = CT.curso_id INNER JOIN Turno AS T ON T.id = CT.turno_id WHERE...
asked by 05.05.2017 / 13:36
1
answer

JPA + Hibernate launching update alone

Hello, I have an object that is managed by Hibernate. On screen, an attribute of this object updates the value and Hibernate immediately fires an update in the database, without even going through methods in the controller or data persistence...
asked by 19.10.2016 / 20:29
1
answer

Help with broken pipe

I have a problem with my system, it is dropping too much connection as a database, this system is up to 12h idle, I need help to configure C3P <!--Configuração do pool de c3p0 --> <property name="c3p0.acquire_increment"...
asked by 17.10.2016 / 20:10
0
answers

JSF + Wildfly dynamically connecting multiple banks

Hello, I have a Web application using JSF + CDI + JPA and WildFly 8 as an application server. So far I'm letting the server manage the transactions, where database connection information, email services, authentication ... are in the server sett...
asked by 16.09.2016 / 22:51
0
answers

JPA Criteria - Using between with Subquery

   "The numbers at the beginning of the queries and the" criteria "were inserted to facilitate the explanation. (1 -...) (2 -...) (3 -...)" I need to do this in the JPA criteria: SELECT DISTINCT service.* FROM service AS service INNER...
asked by 06.12.2018 / 13:46
0
answers

How to handle exceptions with JTA?

I have a project where I'm using JPA with JTA. In the gravar method, I put the @Transactional(Transactional.TxType.REQUIRED) annotation and there is a call to a validation method that can throw an exception called ValidacaoException...
asked by 18.06.2016 / 18:49
1
answer

Entity Spring Repository Error with Relationships

I'm having a project using Spring Boot to serve JSON in a WebService. An error occurred when I add the Repository class. If you remove it the program starts normally (no errors in the console, I do not speak of features). The error is: link...
asked by 08.07.2016 / 20:04