Questions tagged as 'spring-data'

1
answer

Configure Relational and Non-Relational databases in the same project with Spring-Data + Hibernate

I'm trying to create a Java application where I need to set up two databases: MongoDB and MySQL. My idea is to use Spring-Data with Hibernate for both banks, but I found only tutorials for setting up Cross-Store between the banks. Is there an...
asked by 08.04.2015 / 00:06
0
answers

Learning problem with SpringBoot

Hello, I'm starting my study in SpringBoot, where I arrived in a part that I could not solve due to an exception, where I already saw in several topics how to solve, and none worked for me. I created two Person and Cell entities and did th...
asked by 27.12.2018 / 03:38
1
answer

Problem setting up spring data jpa project with Hsqldb

I'm trying to set up a sample project using Spring Data JPA with Hsqldb I made the person class that would be model , the interface repository and a main class to run. I did not create the database because I have a question if...
asked by 23.02.2014 / 22:17
0
answers

Join with Specification

I have the following query: SELECT tab1.nom_shopping, tab1.nom_fantasia, tab1.luc, tab1.dat_vencimento, tab1.num_boleto, tab1.val_saldo_aberto, tab2.num_cpfcnpj negativado, tab2.id_pessoa_vinculo_loja [IdPessoa],...
asked by 12.09.2018 / 20:55
0
answers

Could not read entity state from ResultSet EntityKey OneToMany composite keys

I'm having problems in the oneToMany relationship of two entities using Jpa Hibernate. I have two tables, one cancellation and another that has the orders that are part of the cancellation. The cancellation table has a simple primary key (idc...
asked by 02.02.2018 / 17:56
1
answer

Repository - Records Filter according to user's permission

Searching on how to filter the records with the repository, I found the annotations: @PreAuthorize @PreFilter @PostFilter You have 2 Roles in the system: ROLE_ADMIN and ROLE_USER where ROLE_ADMIN can access all records, ROLE_USER can...
asked by 06.04.2017 / 17:06
0
answers

Select * from Table and No Select * from EntityName - JPA JAVA

My query was built like this, but when it asks: @Query(value = "SELECT CT.id FROM CursoTurno AS CT LEFT JOIN Curso AS C ON C.id = CT.curso_id INNER JOIN Turno AS T ON T.id = CT.turno_id WHERE...
asked by 05.05.2017 / 13:36
2
answers

Call Stored Procedure with JPA 2.0

I need to call the following procedure below, so the company projects use JPA 2.0 and all the examples I encounter are for JPA 2.1 + . prc_performance_vendas_obter(vdataini => :vdataini, vdatafim => :vdatafi...
asked by 06.03.2017 / 21:27
1
answer

Configuring Multiple Databases in Spring Boot

My application has a connection to a remote database (SQLServer), but I would like to perform a small duplication of certain less volatile data in a local and embedded (H2) database to gain in performance. My setup today is that of a single bank...
asked by 03.04.2018 / 15:10
1
answer

SQLGrammarException

Good evening! Can someone help me with the error in my code, I followed the steps of the teacher but presents error in mine and not in his example. I'm using the same dependencies. Here is the snippet of the method and the error. public List&l...
asked by 20.02.2018 / 04:13