mybatis 中的updateByPrimaryKey與updateByPrimaryKeySelective

在abator中可生成iBatis的代碼。其中,Sql_map中帶有的兩個函數是: updateByPrimaryKeySelective 只是更新新的model中不爲空的字段 updateByPrimaryKey 將爲空的字段在數據庫中置爲NULL 例如 若DAO中使用的是 updateByPrimaryKeySelective,則按照不爲空的值去更新。 如果使用updateByPrimaryK
相關文章
相關標籤/搜索