- 修复 UpdateDict 不支持 SET NULL 的更新;#1257

This commit is contained in:
2881099
2022-09-21 14:27:03 +08:00
parent ed3b48c833
commit 4f66451c20
3 changed files with 58 additions and 38 deletions

View File

@ -461,8 +461,10 @@ namespace FreeSql.Internal.CommonProvider
var tempDict = new Dictionary<string, object>();
foreach (var item in dicType)
foreach (string key in item.Keys)
if (!tempDict.ContainsKey(key) && !(item[key] is null))
tempDict[key] = item[key];
{
if (!tempDict.ContainsKey(key)) tempDict[key] = item[key];
else if (!(item[key] is null)) tempDict[key] = item[key];
}
UpdateProvider<Dictionary<string, object>>.GetDictionaryTableInfo(tempDict, orm, ref table);
return;
}