mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-08-23 22:11:36 +08:00
Update mysql json bug
This commit is contained in:
parent
85495383bd
commit
3391e89d71
@ -92,6 +92,10 @@ namespace SqlSugar
|
||||
{
|
||||
result.DataType = this.Context.Ado.DbBind.GetDbTypeName(item.Length > 9 ? UtilConstants.LongType.Name : UtilConstants.IntType.Name);
|
||||
}
|
||||
else if (item.IsJson && item.DataType == null)
|
||||
{
|
||||
result.DataType = "json";
|
||||
}
|
||||
else
|
||||
{
|
||||
var name = GetType(propertyType.Name);
|
||||
|
@ -25,7 +25,7 @@ namespace SqlSugar
|
||||
if (csharpTypeName == "DateTimeOffset")
|
||||
csharpTypeName = "DateTime";
|
||||
var mappings = this.MappingTypes.Where(it => it.Value.ToString().Equals(csharpTypeName, StringComparison.CurrentCultureIgnoreCase));
|
||||
return mappings.HasValue() ? mappings.First().Key : "varchar";
|
||||
return (mappings?.Any()==true) ? mappings.First().Key : "varchar";
|
||||
}
|
||||
public override List<KeyValuePair<string, CSharpDataType>> MappingTypes
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user