Talk to people.
I'm a beginner in Java and I'm doing a small Dynamic Web project using PrimeFaces, JSP, Hibernate and TomCat. Basically it is about several forms of registers and one of them is the register of users. The Domain, Bean, DAO, an...
I'm trying to create an entity with the following mapping:
@Entity
@IdClass(AutenticacaoPK.class)
public class Autenticacao {
@Id
@OneToOne(cascade = CascadeType.REFRESH)
@JoinColumn(name = "codUsuario", unique = false)
private Usuari...
You are giving null exception on line HibernateUtil.getFactory().openSession(); in the main method.
Here are the configuration and test files:
<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE hibernate-configuration PU...
Good morning guys!
I have the following entities:
package br.com.sistema.entidade;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.IdClass;
import javax.persistence.JoinColumn;
import javax.persistenc...
I have two classes, Terminal (which is the parent) and Portaria (child).
I'm using JPA and it's working, but it has a bug that I can not resolve.
I load a list of Terminal and when testing t.getPortarias() it...
I have a JavaFX application with Hibernate (JPA).
In this application I update a TableView with the data I search from BD (MySql).
Whenever I click on the system to fetch some data in the DB, it executes the following code:
public Task&l...
I have a Maven project and I'm having problems at the moment of generating the Database, I'm using Hibernate and Glassfish 4.
No error is generated, simply the database is not generated, I'm new to Maven I may be forgetting some additional co...
I have the following classificacao field in a table.
This field is populated elsewhere and is filled with only 'P' or 'N' , acronyms for Positive and Negative .
I then created enum Java.
Classification.java
p...
For a specific reason, I need to map object-relational (JPA) of my entities with XML.
[Unfortunately,] I can not use annotations to do this. It turns out that on certain properties I need to use Hibernate-specific features. For example, extra la...