Closed
Description
What steps will reproduce the problem ?
Steps to reproduce the behavior:
- Clone the Cosium/spring-data-jpa-entity-graph project from GitHub.
- In the pom.xml file of the cloned project, set the <spring.data.jpa> property to 3.5.0.
- Run test
What is the expected output ?
The project should build successfully, and all existing tests should pass without errors, demonstrating compatibility with Spring Data JPA 3.5.0.
What happens instead ?
Existing tests fail with java.lang.IllegalArgumentException. Specifically, many tests produce the following error:
Caused by: java.lang.IllegalArgumentException: At least 2 parameter(s) provided but only 1 parameter(s) present in query
Environment
- Spring Data JPA version: 3.5.0
- spring-data-jpa-entity-graph version: 3.2.3
Metadata
Metadata
Assignees
Labels
No labels
Activity
dmarotta77 commentedon May 23, 2025
Proposed Fix for Spring Data JPA 3.5.0 Incompatibility
I've investigated this incompatibility with Spring Data JPA 3.5.0 and have a proposed fix.
The changes involve two parts:
pom.xml
modification:I updated the
spring.data.jpa
dependency version:to
EntityGraphAwareJpaQueryMethod.java
class update:The
EntityGraphAwareJpaQueryMethod
class needs to be updated to support the newJpaQueryMethod
constructor signature in Spring Data JPA 3.5.0. Here's the updated class:These changes have passed all unit tests on my end.