mybatis 中的updateByPrimaryKey与updateByPrimaryKeySelective

在abator中可生成iBatis的代码。其中,Sql_map中带有的两个函数是: updateByPrimaryKeySelective 只是更新新的model中不为空的字段 updateByPrimaryKey 将为空的字段在数据库中置为NULL 例如 CartServiceImpl#update 若DAO中使用的是 updateByPrimaryKeySelective,则按照不为空的值去更
相关文章
相关标签/搜索