BUG: Storageable enum primary key

This commit is contained in:
sunkaixuan 2022-11-15 22:30:01 +08:00
parent 19a50ff1af
commit 6dd5ed29cf

View File

@ -539,6 +539,11 @@ namespace SqlSugar
FieldValue = value.ObjToStringNew(),
CSharpTypeName = column.PropertyInfo.PropertyType.Name
});
if(value is Enum&&this.Context.CurrentConnectionConfig?.MoreSettings?.TableEnumIsString!=true)
{
data.Value.FieldValue = Convert.ToInt64(value).ObjToString();
data.Value.CSharpTypeName = "int";
}
//if (this.Context.CurrentConnectionConfig.DbType == DbType.PostgreSQL)
//{
// data.Value.FieldValueConvertFunc = it =>