Questions tagged as 'spring-data'

0
answers

Problems when inserting in a second database (two schema mysql) Spring Boot

I have a problem when trying to insert, modify or delete a record (by requesting post, put and delete) in a second database. In the application I have two datasource defined for two schemas in a Mysql database. The problem is that in the firs...
asked by 19.11.2018 / 06:47
0
answers

Hibernate: @ValueGenerationType within an EmbeddedId does not work when doing INSERT

I am trying to add to my project (use Spring 5.0.2, Spring-data-jpa 2.0.5 and Hibernate 5.2.14) a new annotation that allows me to obtain the date directly from the database (Postgresql) instead of the VM. For this, I have taken as my base th...
asked by 11.11.2018 / 20:31
0
answers

Prevent hibernate from inserting the name of the class in mongoDB

I have a person entity with two simple fields: class Customer { @Id String id String firstName String lastName } by doing a simple save on that entity, using spring mongo repository: repository.save(new Customer(firstName:...
asked by 13.09.2017 / 10:01
1
answer

Why use FROM with Hibernate?

I have been working with Hibernate for some time and I do not understand why they are complicated when making bbdd queries: Root<Foo> fooRoot = criteriaQuery.from(Foo.class); Join<Foo, Foo1> foo1 = fooRoot.join("foo1", JoinType.LEF...
asked by 26.05.2017 / 11:59
3
answers

Spring component annotations

I'm starting to use and, so I've seen, the difference between the annotations @Controller , @Repository and @Service is the layer where you have to use it since it could be said that they are an extension / specialization of...
asked by 23.11.2016 / 16:29
0
answers

Depth of queries with Spring Data Neo4j

I'm starting with Neo4j and I'm trying to make a query with the @Query annotation but it only returns the main object and the other related objects return them to null, as I can do to return the other objects. I leave the exam...
asked by 14.11.2018 / 00:59
1
answer

Query failed with error code 13 and error message

I have a problem with a Spring boot project 2.0.3.RELEASE + mongodb 4 - Instance my DB as mongod --auth --config mongod.conf --dbpath=\data\mongo4\ - Create the user in the following two ways db.createUser( { user: "us1",...
asked by 24.10.2018 / 14:43
0
answers

Contribution SpringData (SpringDataRepositoryGenerator)

This time what I share is a small utility for the generation of Spring Data Repositorys. The code was uploaded to the following link. link     
asked by 28.09.2018 / 23:15
0
answers

Obtain an entity, assign it and save it again

I have a system where I have users and each one can have several roles. @Entity @Table( uniqueConstraints= @UniqueConstraint(columnNames={"username"}) ) public class CustomUser implements UserDetails { private stati...
asked by 20.07.2018 / 05:15
0
answers

Problem with Oracle view queries

I'm having an error that I can not understand why it happens ... and therefore how to avoid it. I will try to explain it. I created an entitity, from an oracle view: @Entity @Table(name = "VER_CONSULTAS_HISTORICO", schema = "HISTORICOS") pu...
asked by 02.03.2018 / 14:29