mirror of
				https://github.com/nsnail/FreeSql.git
				synced 2025-11-04 17:20:49 +08:00 
			
		
		
		
	fix: 修复byte[]类型的乐观锁初始化问题
This commit is contained in:
		@@ -179,7 +179,7 @@ namespace FreeSql.Internal.CommonProvider
 | 
			
		||||
                }
 | 
			
		||||
                if (val == null && col.Attribute.MapType == typeof(string) && col.Attribute.IsNullable == false)
 | 
			
		||||
                    col.SetValue(data, val = "");
 | 
			
		||||
                if (val == null && col.Attribute.MapType == typeof(byte[]) && col.Attribute.IsVersion)
 | 
			
		||||
                if (col.Attribute.MapType == typeof(byte[]) && (val == null || (val is byte[] bytes && bytes.Length == 0)) && col.Attribute.IsVersion)
 | 
			
		||||
                    col.SetValue(data, val = Utils.GuidToBytes(Guid.NewGuid()));
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user