0

这是我的 batis 生成器文件:

<table tableName="jxc_stock_journal" enableCountByExample="true"
            enableSelectByPrimaryKey="true" enableSelectByExample="true"
            enableUpdateByPrimaryKey="true" enableDeleteByPrimaryKey="true"
            enableInsert="true" domainObjectName="JxcStockJournal">
            <generatedKey column="id" sqlStatement="MySql"
                identity="true" />
</table>

因此它将生成映射器 xml 文件。使用 null 签入updateByPrimaryKeySelective方法: 在此处输入图像描述

我需要将一些字段设置为 null updateByPrimaryKeySelective,该怎么做?

4

1 回答 1

0

您需要使用“updateByPrimaryKey”方法设置空值。如您所见,您可以使用“updateByPrimaryKeySelective”来做到这一点。

于 2019-07-24T22:45:12.813 回答