Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ORACLE r2dbc update instead of insert #863

Open
karimifariba opened this issue Sep 12, 2024 · 3 comments
Open

ORACLE r2dbc update instead of insert #863

karimifariba opened this issue Sep 12, 2024 · 3 comments
Labels
status: feedback-reminder We've sent a reminder that we need additional information before we can continue status: waiting-for-feedback We need additional information before we can continue

Comments

@karimifariba
Copy link

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?

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Sep 12, 2024
@southwolf
Copy link

southwolf commented Dec 19, 2024

@karimifariba
I believe this is duplicated / related with #49, and #275, save() determines whether to perform insert() or update() simply by checking if id exists, and the workaround would be implementing Persistable interface and overriding isNew() method, which is a weird solution IMHO...

@schauder
Copy link
Contributor

Spring Data R2DBC doesn't support nested entities.

Please provide a Minimimal Reproducable Example, preferable as a Github repository. Make sure to include the database, either as an in memory database or if that is not possible using Testcontainers.

@schauder schauder added status: waiting-for-feedback We need additional information before we can continue and removed status: waiting-for-triage An issue we've not yet triaged labels Dec 19, 2024
@spring-projects-issues
Copy link

If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.

@spring-projects-issues spring-projects-issues added the status: feedback-reminder We've sent a reminder that we need additional information before we can continue label Dec 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: feedback-reminder We've sent a reminder that we need additional information before we can continue status: waiting-for-feedback We need additional information before we can continue
Projects
None yet
Development

No branches or pull requests

4 participants