Questions tagged as 'hibernate'

0
answers

Map table fields beginning with number

Hello, I'm having trouble mapping the tables in a database where column names start with number. Here is an example of how I tried, but to no avail. @Entity @Table(name = "A_MOT025") public class Motorista { @Id @Column(name = "[0251C...
asked by 22.02.2018 / 20:36
2
answers

Personnel Mapping x Document OneToOne, Cascade

I created a Person and a Document class, the Document data I can persist, but at the time of doing OneToOne in the Person class and inserting a new table in the Person class, an error appears that the Document_ID table does not exist, the What c...
asked by 25.02.2018 / 18:11
0
answers

Failed to persist in JPA

Good evening! Can anyone help me to understand this problem? I am testing an application and when the application tries to persist a front field with a larger number of characters than the one supported in the bank field the error is returned:...
asked by 18.02.2018 / 01:02
0
answers

Is there any restriction on hibernate to perform query using inheritance?

Good morning / afternoon / evening gentlemen. The situation is as follows. I have a query that performs the registration of child entities in order to divide the object. But in a future moment the list is displayed. This data is not all conta...
asked by 21.02.2018 / 02:29
1
answer

Error Starting Tomcat Server

I'm inserting two hibernate dependencies into my pom.xml <!-- https://mvnrepository.com/artifact/org.hibernate/hibernate-core --> <dependency> <groupId>org.hibernate</groupId> <artifactId>hiber...
asked by 16.02.2018 / 15:45
1
answer

Problem with User-Managed Transaction and Flush using JTA and Arquillian

I'm doing some tests with JUnit and, to inject dependencies on it with ICD, I adopted Arquillian. But, there is a problem I did not figure out how to solve without using the flush() method of EntityManager . Basically, I need to...
asked by 08.02.2018 / 18:19
1
answer

Hibernate is not generating id to write to the database

I'm doing the manipulation of an xls file, so that's fine. I can perform setters and getters normally. but in the save to go to the bank, the id is coming null and with that not recording in the bank. I'll post my codes for better visualization....
asked by 05.02.2018 / 12:43
2
answers

Using @Table Hibernate

How do I use the @Table annotation of hibernate using a variable that returns the name of the table, for example @Table(name = "dep4"+Dados.getCodEmp) ? I am using this form but I get the following error: The value for annotation...
asked by 31.01.2018 / 12:11
1
answer

This web container has not yet started

My Java Web application, using Hibernate, published on a Glassfish server and using MySql database published in Hostgator is constantly causing the following error: [2018-01-31T11:51:15.852-0200] [glassfish 4.0] [WARNING] [] [com.mchange.v2.re...
asked by 31.01.2018 / 16:14
1
answer

Java @GeneratedValue + SQL server NEWID + Hibernate

I have a table that has ID set to CREATE DEFAULT ID_Tabelas AS NEWID() , that is, even if I use an insert without the key, it will be generated automatically. How can I do with hibernate to recognize that the database itself will generate...
asked by 24.01.2018 / 11:44