Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

billy1624
Copy link
Member

Resolve #181

@billy1624 billy1624 self-assigned this Sep 28, 2021
@billy1624 billy1624 marked this pull request as ready for review September 28, 2021 11:28
@billy1624 billy1624 force-pushed the error-no-record-updated branch from aaaf8bd to 966f7ff Compare September 30, 2021 02:31
@tyt2y3
Copy link
Member

tyt2y3 commented Sep 30, 2021

We need unit tests using the mock connection on this behaviour too

@billy1624
Copy link
Member Author

We need unit tests using the mock connection on this behaviour too

Added!

Copy link
Member

@tyt2y3 tyt2y3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have noticed a problem. this behavior should only applies to update_one, while for update many, it's fine to have updated 0 rows.

@billy1624
Copy link
Member Author

I have noticed a problem. this behavior should only applies to update_one, while for update many, it's fine to have updated 0 rows.

Fixed

@tyt2y3 tyt2y3 merged commit 125ee40 into master Oct 5, 2021
@tyt2y3 tyt2y3 deleted the error-no-record-updated branch October 5, 2021 14:01
tyt2y3 added a commit that referenced this pull request Oct 7, 2021
Throw error if none of the db rows are affected
arpancodes pushed a commit to arpancodes/sea-orm that referenced this pull request Apr 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Change the behavior of update() to return error when rows_affected is 0

2 participants