Questions tagged as 'jpa'

2
answers

Problems with JPA - Hibernate does not persist EVERY object

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...
asked by 26.12.2014 / 17:57
1
answer

Fetch of children with JPA + Hibernate is not working

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...
asked by 12.01.2015 / 20:38
1
answer

JPA does not reflect the changed data in the DB manually

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...
asked by 27.01.2016 / 16:55
2
answers

Maven Project with Hibernate and Glassfish does not generate the database

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...
asked by 10.03.2015 / 13:15
1
answer

@Enumerated (EnumType.STRING) Hibernate JPA

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...
asked by 01.11.2017 / 18:46
1
answer

Object-relational mapping (JPA + Hibernate) using XML

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...
asked by 09.07.2014 / 03:09
1
answer

query executes in bank but in project points error

I have a query native: SELECT dist.nome Distrito, enti.nome Entidade, dist.id_distrito, dist.codigo_dne, dist.id_entidade, dist.id_municipio, dist.id_uf, dist.flag_ativo, muni.nome Municipio, unfe.nome UF...
asked by 05.10.2017 / 13:52
1
answer

"No Persistence provider for EntityManager" for Hibernate 5.x

Well, I have to update the version of hibernate that I was already trying to implement in my project to avoid bugs of the previous version, but I'm having a hard time persisting in the new version, since there were changes. > The first...
asked by 19.10.2017 / 15:39
1
answer

Hibernate is not creating or updating DB tables

I have classes beans.xml <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javae...
asked by 02.05.2018 / 21:30
1
answer

Foreign key recording as null

Foreign key is writing as null. I have done several searches I could not find a solution. You could help me find my mistake. This is an example that I researched on the internet, if I can get the foreign key in the bank popular, I can do with th...
asked by 13.10.2016 / 21:49