Questions tagged as 'jpa'

1
answer

Error entering data into JPA

import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; @Entity // pode usar para alterar o nome da tabela la no banco //@Ta...
asked by 11.02.2017 / 14:39
2
answers

How to change settings of the persistence.xml file through an external file?

I wanted to know how to change the configuration of the persistence.xml file from an external file. I'm using JSF + JPA. I want to do this not to leave this setting stuck in the source code. Does anyone give me a help?     
asked by 04.08.2016 / 15:02
1
answer

JPQL Query - SQL

Good evening. I have a bean, which has an init () method. One of the goals of this init is to bring the cycle that was opened according to the course of that user, ie If there is no cycle or evaluation process involved with the course of that...
asked by 31.10.2015 / 03:27
1
answer

SQL / JPQL Query

Friends, good afternoon. I have a table in the database called Questao Inside the table I have two columns that are ID and Question . I have a filter that I can not specifically bring only code and asks because the method return is an ob...
asked by 13.10.2015 / 21:06
1
answer

Details with @Autowired and Down object

There is a conflict of concepts with me. I have here a service called: AtividadeService There are some lines that call my attention: import com.dendetech.entity.Atividade; Why import the entity? If it only works for Atividad...
asked by 10.09.2015 / 16:00
1
answer

Hibernate does not recognize annotation of classes

I have a Maven project, with Glassfish 4.0, Hibernate, I'm using annotations and my project was facetted with JPA the persistence.xml file was generated and the Glassfish connection pool is working. however the following message is generated by...
asked by 10.03.2015 / 00:05
1
answer

JPQL JPA - Create a grouped list by date with the sum and profit of all items sold that day

The SQL query below is returning a wrong result for the Delay value field. SELECT DATE(p.dt_pedido) AS barChartLabels, COUNT( DISTINCT p.id) AS qtdPedido, SUM((item.quantidade * item.preco) * p.taxa_compra) AS percentualCompra, SUM(item.quant...
asked by 03.11.2018 / 23:24
2
answers

Hibernate, JPA, does not save the new data in the database

I have a Java Spring MVC application, with Hibernate and JPA and HTML interface. I have two forms that depend on the CadernoCadastrados class and their attributes. In the first form I enter the data of a new Notebook, saved in the database...
asked by 29.10.2018 / 15:02
1
answer

How to fix this and other errors: Failed to convert from type [java.lang.String] to type [java.lang.Long] for value 'list'?

I'm implementing an example of a book on Spring Boot , but after executing, when trying to access the /clientes/list or /clientes/view route in the browser the following errors appear:    Failed to convert value of type 'java.la...
asked by 14.10.2018 / 07:56
1
answer

Code does not update in JPA hibernate in Eclipse

Hello everyone, I'm doing a system to sharpen my techniques a bit and I came across a problem. I modified my code for a while but when I was debugging it looked like it was running the old code. I am doing a crud with Hibernate JPA and Eclipse....
asked by 03.09.2018 / 05:03