Skip to content

Custom delete methods in JPA repositories are partially broken with Spring Boot 3.5.6 #4031

@sazonov

Description

@sazonov

Attached you will find a sample reproducer app with repository containing a custom delete method.
@Modifying int deleteByName(String name);

If I call this method from the ItemService.init I got error: class org.example.eqlparsererror.Item cannot be cast to class java.lang.Integer.

It happens with Spring Boot 3.5.6, If I switch to the version 3.5.5 this app works fine. Spring Boot 3.5.6 uses a new version of the Spring Data BOM, so this may be the cause: https://github.com/spring-projects/spring-boot/releases/tag/v3.5.6.

Upgrade to Spring Data Bom 2025.0.4 spring-projects/spring-boot#47088

Could you please check that.

spring-reproducer.zip

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