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

orm-----Update 默认更新所有的字段补充和完善的建议 #944

Open
qinjinze opened this issue Oct 3, 2021 · 2 comments
Open

Comments

@qinjinze
Copy link

qinjinze commented Oct 3, 2021

通常用户在更新数据的时候通常不知道客户更新哪个字段的,所以未更新的字段也必须赋值,否则采用Update不指定字段则全部更新,如果平台用户多话数据库更新所有字段效率比较低。因此,orm能否增加两个更新功能:
1、updateIsNotEmpty当如果零值或空值则不更新;
2、updatePart(“phone”)当某个值即使有空值,在括号指定了也更新

@qinjinze
Copy link
Author

qinjinze commented Oct 3, 2021

2、updatePart(“phone”)当某个值即使有空值,在括号指定了也更新,其它字段为空值不更新

@flycash
Copy link
Collaborator

flycash commented Oct 9, 2021

你可以直接发 PR过来,:)

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

No branches or pull requests

2 participants