- 增加 IInsertOrUpdate.SetSource(items, tempPrimarys) 指定临时主键参数;#1160

This commit is contained in:
2881099
2022-06-22 21:09:04 +08:00
parent 5fec1254cf
commit 1155ffc781
27 changed files with 109 additions and 101 deletions

View File

@ -43,7 +43,8 @@ namespace FreeSql.KingbaseES
else
{
var ocdu = new KingbaseESOnConflictDoUpdate<T1>(insert.InsertIdentity());
var cols = _table.Columns.Values.Where(a => a.Attribute.IsPrimary == false && a.Attribute.CanUpdate == true && _updateIgnore.ContainsKey(a.Attribute.Name) == false);
ocdu._tempPrimarys = _tempPrimarys;
var cols = _table.Columns.Values.Where(a => _tempPrimarys.Contains(a) == false && a.Attribute.CanUpdate == true && _updateIgnore.ContainsKey(a.Attribute.Name) == false);
ocdu.UpdateColumns(cols.Select(a => a.Attribute.Name).ToArray());
if (_doNothing == true || cols.Any() == false)
ocdu.DoNothing();