Questions tagged as 'spring-jpa'

1
answer

Multi Tenancy with Hibernate update schema

Hello, I'm using an application that uses multiple (multi-tenancy) databases using hibernate. I would like to know if anyone knows any way Hibernate can do the update in the schema of the banks. I have already set the hibernate.hbm2dll.auto: upd...
asked by 05.07.2016 / 22:38
3
answers

What kind of return from a select count (*) in Spring JPA?

I need to know the type of return that Spring JPA returns to put in the Service package, because it is giving NullPointerException : Dao: public interface PlaylistDao extends JpaRepository<Playlist, Long> { @Query("select co...
asked by 23.11.2018 / 18:47
0
answers

ERROR: null value in column "id_municipio_id_municipio" violates the non-null constraint [closed]

This error is occurring when I try to persist the screen data to the bank. I checked, by debugging the screen, that the data is being fetched. When the method exits line 33 of the image it goes straight to line 45. Theserverloglookslikethis:...
asked by 28.09.2017 / 22:38
1
answer

Circular dependency in API Rest with Spring Boot

I am venturing into developing a Rest API using Spring Boot, JPA with Hibernate and Maven to manage repositories. In my modeling I have a class Club : @Entity @Table( name = "CLUB") public class Club { /** * Id da entida...
asked by 24.05.2017 / 19:21
1
answer

Relationship between Resources Rest with Spring boot

I'm learning Spring Boot Rest and with a question I can not solve on my own, could you help me? I created the following mapping between the Launch and Person entities: Person Entity: @Entity public class Pessoa { ... @J...
asked by 17.08.2018 / 03:48
1
answer

OneToOne returning wrong value

Please help me please, I have a problem here and I'm banging my head to resolve this for hours. I use Spring in the project and I have the following relationship in one of my models: @OneToOne() @JoinColumn(name = "ITE_COD_INTERNO") @NotFound(...
asked by 24.11.2017 / 13:36
1
answer

How best to relate this entity

In my application I have a user entity that relates from many to many with the entity courses (one user can enroll in many courses and one course can have multiple users) And the Entity courses relates one to many with the Entity class (one cour...
asked by 20.04.2018 / 19:09
1
answer

Doubt about mapping with Java

I created a project putting system authentication including login and password directly into the Java code, but I know this is super wrong, the most recommended for implementation of authentication is the system to get the login and password dir...
asked by 19.06.2017 / 16:02
3
answers

Multiple query values with JPA / Sprint and Rest

Good morning, I need to make a query via REST where multiple IDs will be sent for example (ID: 1, ID: 2, ID: 3, etc). To search only for an ID I use findById(codigo) , but I do not know how to use multiple data. As I'm using RESTFull, how...
asked by 28.09.2018 / 15:20
0
answers

Spring JPA - Procedure call with sqlserver dialect

Hello, I have the following configuration in my application.properties file: spring.datasource.driverClassName=com.microsoft.sqlserver.jdbc.SQLServerDriver spring.jpa.hibernate.dialect= org.hibernate.dialect.SQLServer2012Dialect However...
asked by 09.08.2018 / 21:46