Questions tagged [spring-data-commons]

The Spring Data Commons project applies core Spring concepts to the development of solutions using many non-relational data stores.

The Spring Data Commons project applies core Spring concepts to the development of solutions using many non-relational data stores.

The goal of Spring Data repository abstraction is to significantly reduce the amount of boilerplate code required to implement data access layers for various persistence stores.

Reference: http://docs.spring.io/spring-data/data-commons/docs/1.6.1.RELEASE/reference/html/

58 questions
68
votes
4 answers

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. This appears to have occurred between M1 & M2. Unfortunately, this is the only [real] implementation of the Pageable…
end-user
  • 2,845
  • 6
  • 30
  • 56
20
votes
2 answers

Spring Data Repositories - Find where field in list

I'm trying to use spring PagingAndSortingRepository with a find MyEntity where field in fieldValues query as follows: @Repository public interface MyEntity extends PagingAndSortingRepository { List
Daniel
  • 6,194
  • 7
  • 33
  • 59
18
votes
2 answers

Spring Data Slice: difference between getSize() and getNumberOfElements()

What is the difference between getSize() and getNumberOfElements in the Spring Data class org.springframework.data.domain.Slice? The Javadoc does not offer too much help here.
jhyot
  • 3,733
  • 1
  • 27
  • 44
16
votes
2 answers

Spring Data Page doesn't serialize Sort to JSON correctly

This issue appeared in Spring-Data release 2. In latest version 1.13.9 (and older) it works fine. Controller code: @RestController public class HelloController { @RequestMapping("/") public String index() { return "Greetings from…
Oleg Danyliuk
  • 201
  • 2
  • 6
12
votes
5 answers

Error during Deserialization of PageImpl : Cannot construct instance of `org.springframework.data.domain.PageImpl`

Issue is when using Spring cache with redis cache manager, not able to deserializer Spring Pageable response due to no default constructor The spring boot version used is 2.1.4.RELEASE Redis config class that uses the serializer @Bean public…
5
votes
1 answer

How to fix the conflict when implement two id interfaces?

One interface is 'org.springframework.data.domain.Persistable', it's a java interface with a method ID getId() in 3rd-party lib. Another interface is a Kotlin interface interface IdEntry { val id: String}. Now my business entry needs to implement…
RJ.Hwang
  • 1,683
  • 14
  • 24
5
votes
0 answers

Java, spring-data-commons, cannot create Range, why?

Java LocalDate implements Comparable, but it should have implemented Comparable to allow for creating a Range. This is so because the declaration is Range>:…
xorcus
  • 999
  • 1
  • 11
  • 12
5
votes
1 answer

The annotation @EnableSpringDataWebSupport does not work with WebMvcConfigurationSupport?

I had been using the WebMvcConfigurerAdapter for a while. Since i could not get all the registered interceptors with the method getInterceptors(), i have switched to WebMvcConfigurationSupport, which has lot of default registered Spring Beans like…
akcasoy
  • 6,497
  • 13
  • 56
  • 100
5
votes
2 answers

Generate links with additional query parameters using PagedResourcesAssembler

I'm using spring-data-common's PagedResourcesAssembler in my REST controller, and I was happy to see it even generates next/previous links in the response. However, in those cases where I have additional query parameters (besides page, size, sort),…
Daniel
  • 985
  • 2
  • 14
  • 18
4
votes
2 answers

Does CrudRepository.save return null for spring data 1.13.18.RELEASE

I understand that for the current version(2.x.x) of spring-data-commons it is guaranteed that the return value of CrudRepository.save() will never be null. However, what about the older versions, specifically 1.13.18.RELEASE? If the older version…
4
votes
0 answers

Spring Common Data 2.1.2 MongoDB can't deserialise Optional value

Spring Common Data 2.1.2 (and Data MongoDB 2.1.2) cannot deserialise Optional field from my class. It worked with previous version (2.0.8), now my object is saved in DB (with MongoRepository.save), but there is an exception when i try to read it…
razor
  • 2,727
  • 6
  • 33
  • 45
4
votes
5 answers

No suitable constructor found for type GeoJsonPoint

Having a lot of trouble figuring out what I'm doing wrong. Sadly I had it working at one point, but can't determine what I changed that broke it. From what I understand this should be fully supported now. Object in question: @Document public class…
4
votes
1 answer

How to create a custom simple Spring Data Repository (without database)

I'd like to create a Spring Data Repository which should get exposed via Spring Data Rest. The problem is my "entities" don't come from a database. I have several classes which have a custom annotation and get scanned, this provides some information…
Benjamin M
  • 23,599
  • 32
  • 121
  • 201
3
votes
0 answers

New "org.springframework.data.geo" package/API in Spring Data Commons

I noticed the introduction of a new package/API related to geo spacial concepts in Spring Data Commons: org.springframework.data.geo. It is officially described as follows: Value types representing geo-spatial concepts. This is quite succinct. Can…
balteo
  • 23,602
  • 63
  • 219
  • 412
2
votes
1 answer

What is a compatible version of spring-boot-starter-data-jpa for spring-data-geode?

Can someone help me find a compatible version of spring-boot-starter-data-jpa for spring-data-geode in Spring Boot version 2.1.4.RELEASE? This is for an application running an embedded cache server with write-behind implementation connecting to an…
1
2 3 4