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

如何update某个字段为null? #928

Open
renwuqiang opened this issue Dec 24, 2024 · 1 comment
Open

如何update某个字段为null? #928

renwuqiang opened this issue Dec 24, 2024 · 1 comment

Comments

@renwuqiang
Copy link

我想将数据库某个字段更新为null。类似这样:
Student student = new Student();
student.setId(1);
student.setAge(null);
studentMapper.updateByPrimaryKeySelective(student);
我只想更新age为null,其余字段不变。能支持吗?

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