Questions tagged as 'spring-data'

1
answer

JPQL JPA - Create a grouped list by date with the sum and profit of all items sold that day

The SQL query below is returning a wrong result for the Delay value field. SELECT DATE(p.dt_pedido) AS barChartLabels, COUNT( DISTINCT p.id) AS qtdPedido, SUM((item.quantidade * item.preco) * p.taxa_compra) AS percentualCompra, SUM(item.quant...
asked by 03.11.2018 / 23:24
1
answer

Spring Data JPA - Query via Specification - ManyToMany and Join with Multiple Entities

Hello, I've assembled the following class Specification: public class ItemVendedorSpecification implements Specification<ItemVendedor> { private static final long serialVersionUID = 1L; @Autowired CategoriaRepository catego...
asked by 22.05.2018 / 16:01
1
answer

unmount objects in an array

I have a search method in the database that brings me the following result: NotethatinsidetheObject[4]comesanotherarraythatcontainsPeople,People,andPeople.Iwouldlikeittoreturnonlythiswayandnotinsideanotherarrayasitishappeningnow,itshouldlook...
asked by 14.01.2018 / 16:30
1
answer

Using the Save command from the Spring data

When using the save of Spring Data command to insert it into the table, am I required to annotate all fields in the template class with anotation @Column ?    If the fields I did not enter accept null, it would save the fields   ...
asked by 03.01.2018 / 14:44
2
answers

Paging with spring data

I have a list of clients per vendor and I'm trying to create a paging to show 10 and 10 clients on my modal in PHP. If anyone can help me thank you, because I'm still not good at spring data. Below is my repository: import java.util.List;...
asked by 12.07.2017 / 14:36
1
answer

SpringBoot Merge

I'm using Spring Full, with Thymeleaf and SpringBoot, but my question is about SpringData, after implementing the interface to make use of the methods Spring makes available in the repository, when I created the Service, I did not find a method...
asked by 15.06.2017 / 21:49
1
answer

Object after persisted and returned inconsistent to a dropdown list

Hello everyone, good afternoon! Well, briefly I have a problem where I have no idea what might be happening. In my opinion, such behavior does not make sense. I'm using Spring MVC + Spring Data to facilitate CRUD operations on my system. I...
asked by 08.08.2014 / 23:09
0
answers

Query Problem in Repository Spring Data Neo4j

I'm implementing a @Query in a @Repository with Spring Data Neo4j. Strangely the query that squeezes directly into the Neo4j Browser is identical to that presented in the console. As below: Query Neo4j in Browser: MATCH (u:User)-[v:VISITS]-...
asked by 13.11.2018 / 19:01
1
answer

How to solve: Column "id" not found [42122-197]?

Folks, I'm creating an API that will display random phrases, from a table in the database. The problem is that whenever I access the route, in the console, I get this exception:    org.h2.jdbc.JdbcSQLException: Column "id" not found [42122...
asked by 01.11.2018 / 02:08
2
answers

SpringData paging with PageImpl the size does not work

I created a method inside a service class to generate a paged product list using SpringData (Java Spring Rest application), follow the code: public Page<ProdutoDTOVendedor> listarProdutos(String descricao, Boolean disponivel,...
asked by 20.10.2018 / 06:13