Skip to content

Optimized QueryUtils.applyAndBind(…) using IN(entities)does not work with EclipseLink #3983

@joeltran

Description

@joeltran

Dear Spring Data JPA,

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.

96968e9

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

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

SpringJPAIssueTest.java
IssueTable.java
IssueRepository.java
pom.xml.txt

Metadata

Metadata

Assignees

Labels

type: regressionA regression from a previous release

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions