mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-04-05 17:37:58 +08:00
Synchronization code
This commit is contained in:
parent
94bcdd56f2
commit
a7fe8d48ee
@ -425,7 +425,8 @@ namespace SqlSugar
|
||||
{
|
||||
DbColumnName=fieldName,
|
||||
Value=fieldValue,
|
||||
PropertyName=fieldName
|
||||
PropertyName=fieldName,
|
||||
PropertyType=fieldValue?.GetType()
|
||||
});
|
||||
}
|
||||
AppendSets();
|
||||
|
@ -35,7 +35,12 @@ namespace SqlSugar
|
||||
public override KeyValuePair<string, List<SugarParameter>> ToSql()
|
||||
{
|
||||
var result= base.ToSql();
|
||||
return new KeyValuePair<string, List<SugarParameter>>(result.Key.Replace("$PrimaryKey", this.SqlBuilder.GetTranslationColumnName(GetPrimaryKeys().FirstOrDefault())), result.Value);
|
||||
var primaryKey = GetPrimaryKeys().FirstOrDefault();
|
||||
if (primaryKey != null)
|
||||
{
|
||||
primaryKey = this.SqlBuilder.GetTranslationColumnName(primaryKey);
|
||||
}
|
||||
return new KeyValuePair<string, List<SugarParameter>>(result.Key.Replace("$PrimaryKey", primaryKey), result.Value);
|
||||
}
|
||||
|
||||
public override long ExecuteReturnBigIdentity()
|
||||
|
Loading…
Reference in New Issue
Block a user