Using the class:
@Entity
public class Pessoa{
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long idPessoa;
@Column(nullable=false, unique = true)
private String nome;
@OneToOne
@JoinColumn(name...
I have a Java application that uses Hibernate, for development I did the configuration of the database using the localhost however for use on other computers I will need to define the IP that will own the database (Server) in my project I use th...
I have a scenario with the following entities: Treinamento , Curso and Aulas .
A Treinamento has a ManyToOne relationship for Curso .
And Aula has a ManyToOne relationship to Curso .
I want...
I have the following problem:
I have a DataTable that is populated with entities of type Login that belongs to Usuario as relationship.
A button named Add Login calls the method addLogin() of Login...
I need to query a database in MySQL and get a table from there to write to a PostgreSQL database through Hibernate / JPA.
I configured persistence.xml as follows:
<?xml version="1.0" encoding="UTF-8"?>
<persistence xmlns="ht...
I have the following Enumerator:
public enum ETipoCasa{
Propria,
Alugada,
Financiada,
Cedida;
}
And I'm trying to persist in the bank the String of this enumerator as the example:
Casa casa = new Casa();
casa.setTipo...
I have the Report Class
public class Report{
private String nome;
@ManyToOne
@JoinColumn( name = "idpai", referencedColumnName = "id" )
private List<Report> subReports
getters e setters...
}
My question is how t...
I'm going to explain the project because I believe that most people usually create the projects using XML, and I created the Spring MVC project by dismissing the files that configure the project as XML.
The problem with my project is that I c...
I'm following the Spring-MVC book project of House Do Code, using the latest version of Hibernate, 4.0.3.
But at a time, when the book indicated the creation of a quoted query
through the following code:
// manager é um objeto da classe jav...
When I try to execute the Persistence.createEntityManagerFactory("Aluno") method of class Persistence I get the following error:
run:
abr 04, 2016 9:11:30 PM org.hibernate.ejb.HibernatePersistence logDeprecation
WARN: HHH015016: E...