Questions tagged as 'hibernate'

3
answers

JPA + Wildfly + Hibernate

Is there a way to dynamically change the connection to the database by changing the standalone.xml file of Wildfly 8 (or 10) ? Currently I have a HibernateSessionFactory class that creates a m EntityManagerFactory with the connection param...
asked by 03.01.2018 / 11:07
1
answer

Refresh the database correctly

Updated : Link with a video that best exemplifies the situation. I have a big problem, I'm having trouble updating the database and displaying the updated data by 2% with% different. I have two pages, one is visible to a position offic...
asked by 16.06.2015 / 14:52
0
answers

Create Tables with Hibernate [closed]

Good afternoon !! I'm new to Hibernate and I've been trying for two days to implement table creation with it, I've already done several tutorials, but it does not work. Can anyone help me? hibernate.cfg.xml <?xml version="1.0" en...
asked by 09.07.2016 / 17:54
2
answers

Customize error message

I forced an error on my system that contains the following message:    javax.persistence.PersistenceException:   org.hibernate.exception.ConstraintViolationException: could not   execute statement It is a constraint violation. How can I c...
asked by 09.06.2016 / 22:20
1
answer

How to structure the hibernate Entity relationship annotations?

I would like to understand the difference between hibernate annotations with JPA: @OneToOne, @OneToMany, @ManyToMany and @ManyToOne of hibernate, how does it work?     
asked by 22.07.2015 / 18:59
1
answer

Analysis and correction of connection test errors using DB using hibernate

Class to test bank connection with hibernate. package br.drogaria.main; public class HibernatUtilTeste { public static void main(String[] args) { //abre sessão HibernateUtil.getFabricaDeSessao().openSession(); /...
asked by 09.10.2015 / 13:40
2
answers

Generation Strategy Id Hibernate in PostgreSQL

I have a system in JEE7 with Hibernate and PostgreSQL database, the tables are with auto Id generation by Hibernate: @GeneratedValue(strategy = GenerationType.AUTO) private Integer id; What happens is that Hibernate generates a unique index...
asked by 18.05.2016 / 06:00
1
answer

Hibernate, force table name in low case

I am using Hibernate 5.2.1.Finally as implementation to handle MySQL database. The problem is that tables are being generated with the first letter in high box, I would force to be all in the box via file of persistence. Currently my file is thi...
asked by 16.08.2016 / 17:58
2
answers

How to make Hibernate "notice" that the value of a column has been set by the database

My table in the database has a column that is populated automatically by the database itself. This table is mapped as a class annotated with @Entity, called EntidadeA . The column that is populated automatically is mapped to a property...
asked by 17.02.2014 / 19:15
3
answers

Hibernate works OK, but does not finish the process

I do not know if this is normal, but Hibernate starts the process, inserts the object into the database, but its java process is open. What do I have to do to make this process stop automatically after insertion? Here is a code that exem...
asked by 17.02.2017 / 20:45