Questions tagged as 'hibernate'

0
answers

Spring Data jpa save () method does not work, returning an object with id null

when testing the call in postman it returns the object as if it were saved but the id comes with value zero, follow my code below @Entity(name = "TB_CLIENTES") public class Cliente implements Serializable { private static final l...
asked by 13.11.2018 / 19:31
1
answer

Use Hibernate to record two equal classes

Good afternoon, I would like to relate the Partida class to the Time class, where I would get the PK (Id) of the home team and the visiting team. I'm wondering how to relate in both classes, since use in class Partida , as...
asked by 19.11.2018 / 21:40
0
answers

Problems with C3P0 properties

I noticed the following information in the console: WARN: HHH000022: c3p0 properties were encountered, but the c3p0 provider class was not found on the classpath; these properties are going to be ignored. hibernate.cfg.xml (Java Resources /...
asked by 06.11.2018 / 17:41
1
answer

Doubt about foreign key hibernate

insert the image description here The diary_place table is being created with 2 user_id field, I want it to be only a user_id referenced as foreign key for the diary and place tables. I want the result to be the same as the second ima...
asked by 07.11.2018 / 19:35
0
answers

Error making Hibernate relationship with Java

Good afternoon guys! I have a question in Hibernate. I have the following case Person - Client - Supplier But I can not make the relationship. follow my codes New Error 18:50:34,405 DEBUG [org.hibernate.SQL] - select SEQ_C...
asked by 01.11.2018 / 18:36
0
answers

Hibernate 5.1.16.Final + MSSQL + Java7 + C3P0

I am successfully using hibernate to query an MS SQL database, but I get the message that I should not use in production. Using Hibernate built-in connection pool (not for production use!) .... 2018-10-23 18:01:40 WARN ConnectionProviderIniti...
asked by 23.10.2018 / 21:30
0
answers

APPLICATION FAILED TO START: Persistent error when starting the application

Full Project: link I'm developing an application with Spring Boot, and when I started the application I ended up finding an error that I could not resolve after hours of searching. Error starting ApplicationContext. To display the condi...
asked by 05.11.2018 / 16:25
0
answers

Hibernate Relationship

Good afternoon person, I have this problem, it must first insert the person and then the client, he is not inserting either, if someone can help me to configure the models and hibernate to do this insert ERROR Hibernate: select...
asked by 01.11.2018 / 21:04
0
answers

LazyDaModel with PrimeFaces DataTable

Personal I have an application developed in Java with primeFaces, Hibernate and MySql database. I developed a method to update my dataTable page by page (Lazy loading). It is a page of Nota Fiscal that loads in the rowExpendive the items of the...
asked by 12.10.2018 / 17:51
1
answer

Insert record into a table and use newly generated ID to insert record into related table

I have insert where I save a record, and I need to use the result of the value saved in another insert . Empresa emp = new Empresa(); emp.setId(1); emp.setNome("Nome da empresa"); repository1.saveAndFlush(emp); RelacaoEmp relEmp...
asked by 17.10.2018 / 16:32