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

Use unscoped to skip adding version control in where condition #15

Closed
icpd opened this issue Sep 15, 2022 · 0 comments · Fixed by #16
Closed

Use unscoped to skip adding version control in where condition #15

icpd opened this issue Sep 15, 2022 · 0 comments · Fixed by #16
Assignees
Labels
enhancement New feature or request

Comments

@icpd
Copy link
Collaborator

icpd commented Sep 15, 2022

Describe the feature

Calling Unscoped does not add version=n in where, which is the same as soft delete

DB.Unscoped().Model(&user).Update("age", 18)
// UPDATE `users` SET `age`=18,`version`=`version`+1 WHERE `id` = 1

Related Issues

#8

@icpd icpd assigned icpd and unassigned jinzhu Sep 15, 2022
@icpd icpd added the enhancement New feature or request label Sep 15, 2022
@icpd icpd linked a pull request Sep 17, 2022 that will close this issue
@icpd icpd closed this as completed in #16 Sep 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants