Questions tagged as 'hibernate'

1
answer

HTML communication with java?

I am working on a small test where I made a table of data in mysql and use hibernate to generate the pojo, the ingnieria inverse and the config file of hibernate cfg in xml. I made a small form in html to try to enter the data and store it in th...
asked by 29.11.2017 / 01:22
1
answer

One-to-One Relationship in Spring JPA does not migrate the foreign key

I have two entities in my Spring Boot project that uses Spring JPA and a MySQL database with Hibernate. These two entities are related to a One to One relationship. The problem is that when I try to add a type of objects, the primary key of the...
asked by 24.11.2017 / 12:45
3
answers

Is it necessary to do all the mapping of all the tables with hibernate?

Good morning everyone, I have been reviewing a Spring + Hibernate application and as I see there are many tables that are not mapped or that do not have an entity defined in Java. I have also seen that many of them do not even have the relati...
asked by 05.10.2017 / 00:18
1
answer

Session.Update in Hibernate does not update a record of type Date

Good morning, I have an application written in Java and behind it an Oracle database. The mapping is done with Hibernate. The fact is that I have a problem when I try to do an update on a table with a column of type Date. I have a class...
asked by 01.06.2017 / 20:08
1
answer

How to connect to the server BDD in Hibernate?

Good, my problem is that I need to connect to the database that I have on a server. The server I have from "Hostinger", it's free but for the capacity it gives it's only for a few things like a BDD. The thing is that I'm programming with that...
asked by 14.06.2017 / 22:01
1
answer

Initialize a Lazy list in hibernate using a criterion with a parameterized SetAlias

I have the following code: criterio = session.createCriteria(Tecnico.class) .add(Restrictions.eq("expediente", usuario)) .add(Restrictions.eq("password", contrasenia)) .createAlias("empresa", "empresa", JoinType.LEFT_OUTER_JOIN) .setF...
asked by 10.03.2017 / 16:42
2
answers

Error with one many relations RestFul spring hibernate

Hello, how are you? I am putting together a small api rest ful project and using a single table without relationships works well, now if I add more tables and relationships, the json is missing. Consiguration @Configuration @ComponentScan(base...
asked by 03.03.2017 / 18:41
1
answer

Problem saving with JPA

I am trying to prove a method that I have created to save in a database using JPA, it is as follows: Through the following class: public class Prueba { UsuarioImpls usuarioIm= new UsuarioImpls(); public void guardaUsuario(){ String...
asked by 06.12.2016 / 17:58
1
answer

Avoid cascade erasure JPA

I have the following class: /** To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package modelo; import java.io.Se...
asked by 06.12.2016 / 13:53
1
answer

Exception in thread "main" java.lang.ExceptionInInitializerError - Hibernate with IDE Eclipse

I can not give in the key with the error. This is my file hibernate.cfg.xml <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 3.0//EN" "htt...
asked by 31.01.2017 / 05:20