-
Notifications
You must be signed in to change notification settings - Fork 133
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
Default ID value on new record is inserted when optimistic locking is enabled #557
Comments
This works as expected. We include all non-null fields in the |
Please see here:
I've confirmed that the behavior is correct when |
Thanks for the hint and revisiting this topic, it qualifies as an actual bug. I think it requires a bit of investigation on how we want to approach the issue. We will need to post-process |
…tyTemplate. We now check in R2dbcEntityTemplate whether we need to skip the Id value if its value is null or a primitive using its default. Previously, the check was located in the converter. Converting an entity afteri ncrementing the version of a versioned entity would write the Id value as the entity was no longer considered to be new. Closes #557.
I believe the issue occurs here. The version is incremented prior to deciding if the ID should be included. This results in the record being considered not new for purposes of including the ID.
The text was updated successfully, but these errors were encountered: