Skip to content

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

Open

Description

@renwuqiang

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions