Skip to content

Regression issue with Spring-Data-JPA 3.5.x #35360

@joeltran

Description

@joeltran

Dear Spring JPA Framework,

While upgrading from Spring 3.4.x to spring 3.5.x, I notice a regression issue while calling issueRepository.deleteAllInBatch() of a JpaRepository object. We are now facing the following error:

Caused by: java.lang.IllegalArgumentException: You have attempted to set a value of type class java.util.Vector for parameter 1 with expected type of class com.issue.IssueTable from query string delete from IssueTable x where x IN (?1).

While investigating the root cause, I notice the following commit which could have introduce the side effect.

spring-projects/spring-data-jpa@96968e9

I tried to use the issueRepository.deleteAllByIdInBatch() method which also does not work and throws the following error:

Caused by: Exception [EclipseLink-0] (Eclipse Persistence Services - 3.0.4.v202310250740): org.eclipse.persistence.exceptions.JPQLException
Exception Description: Problem compiling [delete from IssueTable x where id in :ids].
[31, 33] The identification variable 'id' is not defined in the FROM clause.

I guess there is a missing "x." before the id in the generated SQL.

I have attached 3 java files (1 entity, 1 repository, 1 unit test) + pom in order to reproduce the issue.

Best regards,
Joel

IssueRepository.java
IssueTable.java
SpringJPAIssueTest.java

pom.xml.txt

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions