this is my batis generator file:
<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> so it will generate the mapper xml file. with null check in updateByPrimaryKeySelective method: 
and I need to set some field to null with updateByPrimaryKeySelective, how to do it?
2 Answers
You need to use the "updateByPrimaryKey" method to set a null value. As you've seen, you can do that with "updateByPrimaryKeySelective".
2use
int updateByExampleSelective(@Param("record") PriceActivityApplyDO record, @Param("example") PriceActivityApplyExample example, @Param("selective") PriceActivityApplyDO.Column ... selective); 1