Top "Spring-data" questions

Spring Data is an umbrella open source project which contains many subprojects that are specific to a given database.

Spring-Data JPA: save new entity referencing existing one

The question is basically the same as below one: JPA cascade persist and references to detached entities throws PersistentObjectException. Why? …

java merge spring-data spring-data-jpa persist
Handling soft-deletes with Spring JPA

I have a table Stuff defined as... id, <fields>..., active Active is the soft-delete flag and is always 1 …

java spring jpa spring-data spring-data-jpa
PageRequest constructors have been deprecated

I'm working the Spring Data Commons v2+ snapshot, and I see that the constructors for a PageRequest have been deprecated. …

java spring spring-data spring-data-commons
updating boolean value in spring data jpa using @Query, with hibernate

I have spring-data and hibernate configured and running. I can save records using spring-data but for some reason I am …

hibernate spring-data spring-data-jpa
How to return only specific fields for a query in Spring Data MongoDB?

How can we select specific fields in Spring Data Mongo. I tried the following but I got cast exception from …

java spring mongodb spring-data spring-data-mongodb
Spring Data optional parameter in query method

I want to write some query methods in repository layer. This method must ignore null parameters. For example: List<…

spring hibernate spring-data spring-data-jpa jpql
How can we create Auto generated field for mongodb using spring boot

I write some code.I want to make questionId field in BaseQuestion Class as Autogenerated.Any solution for that? I …

mongodb spring-boot spring-data spring-data-mongodb
How to get all results in one page using Spring Data Pagination

I want to get all the results in single page, I've tried with Pageable p = new PageRequest(1, Integer.MAX_VALUE); …

java spring spring-data spring-data-jpa spring-repositories
Spring data jpa - How to combine multiple And and Or through method name

I am trying to migrate the application. I am working on from Hibernate to Spring Data Jpa. Though spring data …

java spring-data-jpa spring-data
Spring Data JPA Projection selected fields from the DB

I was testing Spring Data 1.10.4.RELEASE, following the example in Spring Data Docs http://docs.spring.io/spring-data/jpa/docs/…

java spring-data-jpa spring-data projection