mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-08-24 07:22:57 +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);
|
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
|
else
|
||||||
{
|
{
|
||||||
var name = GetType(propertyType.Name);
|
var name = GetType(propertyType.Name);
|
||||||
|
@ -25,7 +25,7 @@ namespace SqlSugar
|
|||||||
if (csharpTypeName == "DateTimeOffset")
|
if (csharpTypeName == "DateTimeOffset")
|
||||||
csharpTypeName = "DateTime";
|
csharpTypeName = "DateTime";
|
||||||
var mappings = this.MappingTypes.Where(it => it.Value.ToString().Equals(csharpTypeName, StringComparison.CurrentCultureIgnoreCase));
|
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
|
public override List<KeyValuePair<string, CSharpDataType>> MappingTypes
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user