Questions tagged as 'hibernate'

2
answers

Hibernate Spatial + Postgis + Geotools - persistence failure

I have a problem to persist a geometric data in the database (Postgres) I read in the forums and documentation and did not find anything about it, can someone give me some help? Libs: pom.xml with versions <hibernate.envers.version>...
asked by 28.11.2017 / 17:07
1
answer

Java Web - remove method Caused by: org.hibernate.MappingException: Unknown entity: java.lang.Integer

Gent, and I'm trying to create a method in which I delete the database record. However, it is giving the following error: Caused by: org.hibernate.MappingException: Unknown entity: java.lang.Integer Code: public void delete(int user)...
asked by 10.12.2017 / 03:35
1
answer

Average Hibernate / SQL of a table with multiple relationships

I have the following tables TABLE1 id value table2 TABLE2 id table3 TABLE3 id And with that, I would like to average TABLE 1, with WHERE in the TABLE 3 parameters with Hibernate / persistence, where my tables are obj...
asked by 01.11.2017 / 18:33
1
answer

JPA entity generating column with double name id_municipio_id_municipio

I have an entity called districts that contains a relationship with the municipalities table. When I generate the database the table districts creates the field id_municipio_id_municipio being that was to be generated only id_municipality. cl...
asked by 28.09.2017 / 15:34
1
answer

Database Test with Spring Boot

Personally I have an error, when I run my application with the profile test, Spring Boot does not create the same database in the local profile. Any suggestion? Here's my application-local.properties file: # Hibernate logging.level.org.hibe...
asked by 17.11.2017 / 15:54
2
answers

Subquery in Java HQL

Hello, I'm in a project that uses geolocation and I'm doing a feature to list the stores closest to the location chosen by the user. I'm using the PostgreSQL database and did this query to perform the search: SELECT ID, CIDADE, CNPJ, DESCRICA...
asked by 07.09.2017 / 22:31
1
answer

How to list users and their "Roles"

Hello! I need to list users' access level on my Users Lookup page. But I can not access Role data through User. The User entity has the Role attribute that is mapped with the ManyToMany annotation, like this: @ManyToMany(cascade = CascadeType....
asked by 12.09.2017 / 20:02
1
answer

Insert data into table with jsf, hibernate jpa

I am having problems, in the project I am developing in jsf using jpa and hibernate. I am not able to register the customer data in my database how can I relatify the registration? Code EntityManagerFactory factory = Persistence.createEntit...
asked by 22.06.2017 / 01:19
2
answers

Find out which column would be truncated (data would be truncated)

Good evening! When I try to insert a record in SQLServer through my application I am getting a truncated data message. The problem is that there are many columns that this screen fills and I have no idea which one is being truncated. Is there an...
asked by 02.05.2017 / 23:13
1
answer

What settings are required to make spring boot generate tables automatically? [closed]

I'm currently trying to set up my application with spring-boot to generate tables automatically but I still do not know how, can anyone help?     
asked by 14.05.2017 / 19:12