Questions tagged as 'jpa'

2
answers

Modeling Spring JPA Person - PersonFisica - Official

I did the data modeling (UML) but at the time of implementation I'm doubtful how to do it. I wanted you to have only one Person table. In this person table I would have the field tipoPessoa("p","f") and the fields if the person is c...
asked by 16.07.2018 / 06:03
1
answer

Problem saving two sales at the same time - JAVA

I have a problem saving two sales at the same time on different computers, when both ends, one replaces the other. I'm using @ManagedBean , @SessionScoped . This is my method salvar() in the controller: public String salv...
asked by 20.07.2018 / 16:37
1
answer

Java - Query Spring with current date

I have the following repository with the following method @Query("SELECT m FROM Money m WHERE m.data = CURRENT_DATE()") Money findTop1IfHasMoneyInCurrentDate(); My money class looks like this: @Entity @Table(name="MONEY_DATA", schema...
asked by 12.07.2018 / 18:03
1
answer

Error deserialize JSON - How to solve?

I'm using jpa and I have these two entities: @Entity @JsonIdentityInfo( generator = ObjectIdGenerators.PropertyGenerator.class, property = "id") public class Categoria implements Serializable { @Id @GeneratedValue(strategy = Gene...
asked by 28.04.2018 / 22:45
1
answer

Doubt regarding join with multiple tables

I have a sales class and it receives many products (manyToOne) and client (oneToMany) and would like to put everything together into a join to make a report with just the information you want. I tried to venture to implement but gave 500 Erro...
asked by 28.04.2018 / 17:58
1
answer

JPA insert an object that has a list as an attribute

I am developing a system in layers (packages), to exercise the concepts of class and I came across a doubt I would like to create a product class, it has attributes that are references of other classes: @Id @GeneratedValue(strategy = Generatio...
asked by 24.04.2018 / 00:36
1
answer

Error listing bank data - JPA2 and Hibernate / JSF

Console error in eclipse mar 27, 2018 2:05:24 PM com.sun.faces.application.view.FaceletViewHandlingStrategy handleRenderException GRAVE: Error Rendering View[/Fornecedor.xhtml] javax.el.ELException: /Fornecedor.xhtml @29,86 value="#{fornecedo...
asked by 27.03.2018 / 19:17
1
answer

Problem performing a select with JPA

I'm facing a bug that I can not figure out a solution to. When I perform a persist and then select the received and normal result, but when performing an update and after that the select instead of displaying the updated result the result of...
asked by 27.12.2017 / 18:10
1
answer

Factory error using @Embeddable in JPA

I need to create a composite key on my system, after researching a little to find out that I should implement @Embeddable, until all right, I added the class in my system implementing the keys, but when I try to run the factory it indicates a pr...
asked by 11.01.2018 / 14:51
1
answer

Spring boot + jpa + LocalDate

I'm not able to configure the convert classes in the spring boot to convert the date coming from the view into String to the controler that expects a LocalDate java8, could anyone give me a hint?     
asked by 25.11.2017 / 19:04