Questions tagged as 'spring-data'

1
answer

Save an object with a list using Spring CrudRepository

Hello, Is there any way to save an object with a list of objects (Set)? For example, I have the Artist and Album objects, Artist has a list of Albuns (Set). I would like when saving the Artist also save the list of Albums together, which would a...
asked by 18.09.2018 / 04:28
0
answers

Returning entities according to search using Predicate

My name search is not working, somehow it is not passing Predicate . When I make a request at: localhost: 8080 / citys? name = 2 You will have the same entities as: localhost: 8080 / citys Note: my column name is city 1,...
asked by 30.08.2018 / 19:37
0
answers

Spring Tools Suit - Extension for creating meta model

Hello, I was reading an article where author creates a meta-class class to work with strongly typed queries. I would like to know if there is any extension or plugin for the Spring-Tools-Suite (STS) IDE that automatically creates metamodel cl...
asked by 27.05.2018 / 12:45
0
answers

Problem persisting in SPRING-DATA / JPA using Compound key / Does not return Id generated

Hello everyone, Has anyone had this problem when saving a class with a compound key, the Spring Data API does not return with the generated id? I made a test with primitive classes with unique id then it works normally and returns the generate...
asked by 21.02.2018 / 19:03
1
answer

Float with null value Spring

I have an application with Spring Data. A Call the findAll () method of Spring, there are null values in the database. When doing the set of the object the field comes with null value by triggering the error message: Can not set float field br.c...
asked by 29.12.2017 / 19:39
1
answer

Filter in OneToMany mapping (Spring)

I searched the internet but, I could not understand very well how I would do this using the Hibernate filters. Well, come on: I have a OneToMany: @OneToMany(mappedBy = "pedido", cascade = CascadeType.ALL) @Getter private final List<Pedid...
asked by 20.07.2017 / 02:41
2
answers

How to add custom methods to all spring data services

I've implemented methods on a Repository so all my child repositories have the same methods. Lowers the code of how I implemented a% custom% This is the interface: @NoRepositoryBean public interface BaseMyRepository<T, ID exte...
asked by 16.05.2017 / 23:43
1
answer

cdi does not find daos (spring data + ejb + cdi)

The situation is as follows, I'm using the spring boot and the first thing I did was disable the cat tone and use wildfly (10) I used spring data to create Daos public interface AutoresDao extends JpaRepository<Autor, Long >{} Then...
asked by 27.01.2017 / 01:09
1
answer

How to access an inherited attribute in an entity with a query in Spring Data

I have the Client entity that extends Person: @Entity @Table(name = "cliente") @PrimaryKeyJoinColumn(name="id_pessoa") @Document(indexName="cliente") public class Cliente extends Pessoa implements Serializable { Person has the attribute:...
asked by 10.03.2016 / 15:28
1
answer

View not returning the updated DB data

I have a bank view that when registering a new record the same view brings the outdated values to my listing. It only brings the data up to date if I bring down the server and upload again. I'm using Spring Data and below is more details to h...
asked by 24.06.2015 / 17:30