Questions tagged as 'hibernate'

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
2
answers

Merge using Hibernate without deleting other Java data

In my Java application Hibernate for bank interaction I use a controller class created even by NetBeans, but the problem I have is the following when doing an edit in some field and only pass this value in the method that I'm going to call and m...
asked by 22.05.2015 / 14:07
1
answer

How to persist the value returned by a method?

In a class that has a collection, I need to persist the count of collection elements that follow certain condition. So I need to save the result of a method that checks all elements of this collection. Example: class Group { private List...
asked by 05.11.2014 / 16:27
1
answer

Is there something like fluent nhibernate for java hibernate?

I know that fluent nhibernate (hibernate version for .net) uses lambdas and that java only implemented now in version 8. But is there any way to set hibernate of java through code? and not through xml...
asked by 01.04.2014 / 20:20
1
answer

Auxiliary Table with Composite PK

I have a provider table: @Entity(name = "tbl_fornecedor") public class Fornecedor extends PessoaJuridica implements Serializable, Desativar { private static final long serialVersionUID = 1L; @Id private String cnpj; /*Relaci...
asked by 13.12.2018 / 16:14
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

Get the last record by date from a posting history in mysql

I need to get the last donation situation in a given period. I need to group by donation and situation. Add up by situation and order donations by situation, taking only the last. Tabela LoteRetornoDoacao Campos: id,dtBaixa,situacaoDoacao,vrTo...
asked by 30.11.2018 / 01:49
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
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