Mybatis中updateByPrimaryKeySelective和updateByPrimaryKey

在mybatis中常常用到這2中方法。根據實體類主鍵進行跟新,並返回1或者0. int updateByPrimaryKeySelective(TbItem record); int updateByPrimaryKey(TbItem record);  (1)更新語句上的差異:    因此: updateByPrimaryKeySelective會對字段進行判斷再更新(如果爲Null就忽略更新)
相關文章
相關標籤/搜索