Skip to content

Guard save(…) with provided Id with TransientDataAccessException if row does not exist #232

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

Closed
schauder opened this issue Nov 12, 2019 · 1 comment
Labels
type: enhancement A general enhancement
Milestone

Comments

@schauder
Copy link
Contributor

This is equivalent to https://jira.spring.io/projects/DATAJDBC/issues/DATAJDBC-438

@mp911de mp911de changed the title We should through an exception when we decide to perform an update in order to save an entity and 0 rows get updated Guard save(…) with provided Id with TransientDataAccessResourceException if row does not exist Nov 22, 2019
@mp911de mp911de added this to the 1.0 GA milestone Nov 22, 2019
@mp911de mp911de added the type: enhancement A general enhancement label Nov 22, 2019
@mp911de mp911de changed the title Guard save(…) with provided Id with TransientDataAccessResourceException if row does not exist Guard save(…) with provided Id with TransientDataAccessException if row does not exist Nov 22, 2019
mp911de added a commit that referenced this issue Nov 22, 2019
mp911de added a commit that referenced this issue Nov 22, 2019
…cessException if row does not exist.

We now emit a TransientDataAccessException if an object with a provided Id yields no affected rows. Such an arrangement is typically an indicator for a bug where calling code expects the object to be inserted with a provided Id.
schauder pushed a commit that referenced this issue Nov 28, 2019
…cessException if row does not exist.

We now emit a TransientDataAccessException if an object with a provided Id yields no affected rows. Such an arrangement is typically an indicator for a bug where calling code expects the object to be inserted with a provided Id.
@schauder
Copy link
Contributor Author

schauder commented Nov 28, 2019

This is fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

2 participants