Skip to content

org.springframework.orm.ObjectOptimisticLockingFailureException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect) #4019

@HN0109

Description

@HN0109

If there is the jakarta.persistence.Convert annotation in the entity field, an exception will occur when using org.springframework.data.repository.CrudRepository#deleteById for deletion.
Using the H2 database is normal. However, using the MySQL database will cause this problem.
spring boot version 3.5.6, mysql version 8.0.37,sample code https://github.com/HN0109/jpa-test.git

Metadata

Metadata

Assignees

No one assigned

    Labels

    for: external-projectFor an external project and not something we can fix

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions