mirror of
				https://github.com/nsnail/FreeSql.git
				synced 2025-11-04 01:05:27 +08:00 
			
		
		
		
	- 优化 IInsertOrUpdate SetSource tempPrimary 自增的忽略保存;
This commit is contained in:
		@@ -62,7 +62,7 @@ namespace FreeSql.MySql.Curd
 | 
			
		||||
                    insert.InsertIdentity();
 | 
			
		||||
                    if (_doNothing == false)
 | 
			
		||||
                    {
 | 
			
		||||
                        var cols = _table.Columns.Values.Where(a => _tempPrimarys.Contains(a) == false && a.Attribute.CanUpdate == true && _updateIgnore.ContainsKey(a.Attribute.Name) == false);
 | 
			
		||||
                        var cols = _table.Columns.Values.Where(a => _tempPrimarys.Contains(a) == false && a.Attribute.CanUpdate == true && a.Attribute.IsIdentity == false && _updateIgnore.ContainsKey(a.Attribute.Name) == false);
 | 
			
		||||
                        sql = new OnDuplicateKeyUpdate<T1>(insert)
 | 
			
		||||
                            .UpdateColumns(cols.Select(a => a.Attribute.Name).ToArray())
 | 
			
		||||
                            .ToSql();
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user