spring-projects / spring-data-r2dbc

Provide support to increase developer productivity in Java when using Reactive Relational Database Connectivity. Uses familiar Spring concepts such as a DatabaseClient for core API usage and lightweight repository style data access.
Apache License 2.0
708 stars 132 forks source link

ORACLE r2dbc update instead of insert #863

Open karimifariba opened 1 week ago

karimifariba commented 1 week ago

Spring Boot 3.3.3 RELEASE Spring Data R2DBC 3.3.3 R2DBC-(ORACLE) 1.2.0

If I call #save on a new 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 [oracle-r2dbc] (https://github.com/oracle/oracle-r2dbc) 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?