Skip to content

SimpleR2dbcRepository returns error if call save on an unchanged entity #253

Closed
@maccamlcQ

Description

@maccamlcQ

Spring Boot 2.2.1.RELEASE
Spring Data R2DBC 1.0.0.RELEASE
R2DBC-(Mysql/SPI) 0.8.0.RELEASE

If I call #save on an unchanged entity, then currently, I am getting an error: Failed to update table [%s]. Row with Id [%s] does not exist.

I am using the r2dbc-mysql library.

If I alter my path to ensure the item is always actually updated, before save gets called, then it succeeds as expected.

As this is a nested entity, it is being saved as a side-effect of the primary entity.

Is this a bug, as it worked previously for me, or do I need to update the code flow to perform a read and check if anything has changed before I call save?

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