Questions tagged as 'jpa-2.0'

2
answers

Convert DTO to Entity Java

I have the following problem, I am trying to create a method that converts DTO's to Entity's and vice versa until the moment I arrived at the following method that converts perfectly when they are compatible attributes String to String ,...
asked by 17.03.2015 / 15:59
2
answers

Return of select objects (ComboBox) with Hibernate + JSP + VRaptor. Does not fill relationship between tables

I have an object TabelaPrecoItem with all the structure formed and almost everything working, follows the model model. @Entity @Table(name = "fov_tabela_preco_itens") public class TabelaPrecoItem implements Serializable {...
asked by 16.05.2014 / 15:15
1
answer

Calculate the total Sales Revenue

I have a query page that shows the total revenue for each product and I want to calculate the total sum of the revenue but the account is going wrong. The correct doing the sum in hand gave 264,660.00 and doing in java gave 18,830.00 link...
asked by 18.07.2017 / 21:06
0
answers

how to change an object instead of one properties at a time using JPA

I have a @Entity called Employee, when I need to change the properties name, position, salary etc .. I have to do one property at a time as the example below. My class FunContent @Transactional public void atualizar(FuncionarioMode...
asked by 11.05.2017 / 16:52
1
answer

Jpa does not create column @lob

I am mapping a @lob field to write image to a table, but jpa creates the table, but does not create the column. I created the column manually in MYSQL, but the bytes do not persist there either. My Entity: @Entity @Table(name = "TB_IMAGEM"...
asked by 19.03.2017 / 19:42
1
answer

Spring + Hibernate

Good morning! I am studying Spring MVC, Maven and Hibernate. In the project structure created with Maven, where do I place the applicationContext.xml file? Thank you.     
asked by 02.02.2017 / 14:42
1
answer

ERROR: column "type" of relation "tb_people" does not exist

Hello. I'm trying to persist a record, but when I run it, it is returning the error below: // ... @Inheritance(strategy = InheritanceType.JOINED) @DiscriminatorColumn(name = "tipo", discriminatorType = DiscriminatorType.STRING) @Discriminat...
asked by 21.01.2017 / 14:55
0
answers

java.lang.IllegalStateException: Can not create a session after the response has been committed [closed]

Good morning guys, I have a strange problem in my application only after I generate War and send to Integrator, the application does not even open the Login screen, this error is returned: INFO: Exception when handling error trying to reset...
asked by 03.10.2016 / 19:23
1
answer

property "hibernate.hbm2ddl.auto" value="update" is not working with postgres

The persistence.xml: configuration property property name="hibernate.hbm2ddl.auto" value="update" It is not working or better this is giving error at the time of deploy. If used as create works but even in development getting erased the...
asked by 29.06.2016 / 13:45
0
answers

Microservices + JPA Entities

I have two REST microservices (separate projects) responding by the following entities with JPA mapping (@Entity) and each with their own database. Product (ID and TITLE) and Category (ID and TITLE) I found some comments saying that it w...
asked by 25.05.2016 / 13:31