Synchronization code

This commit is contained in:
sunkaixuan 2024-05-21 08:59:14 +08:00
parent 73bda90171
commit 196038597f
2 changed files with 5 additions and 1 deletions

View File

@ -404,7 +404,7 @@ namespace SqlSugar
{ {
FieldName =item, FieldName =item,
ConditionalType = ConditionalType.Equal, ConditionalType = ConditionalType.Equal,
FieldValue = model[item].ObjToString(), FieldValue = model[item].ObjToStringNoTrim(),
CSharpTypeName = model[item]==null?null : model[item].GetType().Name CSharpTypeName = model[item]==null?null : model[item].GetType().Name
})); }));
i++; i++;

View File

@ -772,6 +772,10 @@ namespace SqlSugar
var leftName = item.Key; var leftName = item.Key;
if (anyParent) if (anyParent)
{ {
if (rightValue == null)
{
rightValue = UtilMethods.GetDefaultValue(rightColumnInfo.PropertyInfo.PropertyType);
}
rightValue = rightValue.GetType().GetProperty(item.Value.Name).GetValue(rightValue); rightValue = rightValue.GetType().GetProperty(item.Value.Name).GetValue(rightValue);
} }
//// var rightColumn=col //// var rightColumn=col