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
1
vote
0 answers

Failed to query by spring-data-jpa query methods with suffix IN due to the cachedCriteriaQuery is not correct on openjpa 2.4.1

Update: After I digged into the source code of spring-data-jpa repository query methods, I found the root cause is the createQuery method of PartTreeJpaQuery as below. This method will be called by the invoke method of the…
1
vote
1 answer

spring data jpa and commons compatibility

I meet an exception running a project using spring data jpa org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 18 in XML document from class path resource [META-INF/applicationContext.xml] is invalid; nested exception is…
0
votes
0 answers

Elasticsearch compatiblity with Springboot 3.0.7

While upgrading our projet from spring-boot 3.0.2 to 3.0.7, I'm facing a problem with Elasticsearch I suspect that is related to the version of Elasticsearch server we use that is not compatible with SB 3.0.7. When I uploaded to v7.10.1 of…
0
votes
1 answer

What's the order of PersistentProperty instances are iterated over for a Spring Data PersistentEntity?

What is the access order of PersistentPropertys when iterating over them? Is it the same as in the definition of PersistentEntity, or is it random? I couldn't find any information about this in the Javadoc of Spring Data.
akshay
  • 207
  • 1
  • 2
  • 7
0
votes
0 answers

Hazelcast KeyValueRepository (spring-data-keyvalue) not working with list of objects as a entity

We have recently upgraded our application from spring boot 2.1.6.RELEASE to 2.6.14. Along with it, we also upgraded spring-boot-starter-data-jpa to be compliant with spring-boot which bring in upgrade of these two…
0
votes
0 answers

Spring Data commons decapitalizing property name

We are using getQuery(@Nullable Specification spec, Pageable pageable) method from Spring class SimpleJpaRepository. This call eventually lands on constructor of PropertyPath. Here property name is decapitalized, this is causing issue in our…
0
votes
0 answers

Upgrading spring-boot from 2.3.7 to 2.5.8 throwing failied to instantiate requestMappingHandlerAdapter

I am trying to upgrade spring-boot from 2.3.7 to 2.5.8 and seeing the below error in one of the SpringBootTest java.lang.IllegalStateException: Failed to load ApplicationContext at…
tuk
  • 5,941
  • 14
  • 79
  • 162
0
votes
1 answer

spring data cassandra : how to tune the return type of an update @Query

Let’s say I have a table like this @Table(value = "myTable") public class MyRow { private UUID id; // primary key private String state; } I have a query that updates a row based on an existence condition @Query("update myTable set…
cax21
  • 11
  • 1
0
votes
1 answer

Spring Data TypedSort with nested property criteria support

I am trying to define the following sort criteria: TypedSort typedSort = Sort.sort(Task.class); Sort typedSortCriteria = typedSort.by(task -> task.getAssignee().getLastName()) .descending(); But I'm getting a compilation exception: The…
Gerardo Roza
  • 2,746
  • 2
  • 24
  • 33
0
votes
0 answers

How can I order by integer in a string in Spring JPA's CriteriaBuilder?

My data consists of strings that can be numbers or strings ("12" should be seen as a number while "12REF" should be seen as a string). I am looking to implement an order by in my criteriaBuilder that sorts the strings by numbers first, and puts the…
0
votes
0 answers

OptimisticLockingFailureException is not thrown by spring data couchbase

I am trying to migrate my application from spring boot 2.2.6 to 2.3.6. This update also updates the spring-data-couchbase 3.2.6 to 4.0.2. Earlier version was throwing OptimisticLockingFailureException but with this upgrade the exception is never…
0
votes
1 answer

Problem with upgrading of libraries (spring) in JAVA

My project contains a lot libraries and I want update following: spring from 5.0.10.RELASE to 5.3.18 or…
Michlut
  • 51
  • 5
0
votes
0 answers

package issue when using spring-data-commons with spring-boot-2.1.x

I am working on Spring Boot migration from 1.5.12 to 2.1.14. We are using Gradle as a build tool, so as part of Spring Boot migration we had to change Gradle from 3.x to 4.x and trying to update the build.gradle as required. After migrating, erros…
0
votes
0 answers

spring-jpa - creating query similar to in clause for nested entity id using ExampleMatcher for QueryByExampleExecutor

I was trying out Spring ExampleMatcher for creating a query that requires use of in clause and between clause. public class A{ private Long id; private B b; private D d; private Date created; } public class B { private Long…