diff --git a/Src/Asp.NetCore2/SqlSugar/Realization/MySql/CodeFirst/MySqlCodeFirst.cs b/Src/Asp.NetCore2/SqlSugar/Realization/MySql/CodeFirst/MySqlCodeFirst.cs index 191907293..f93fc0750 100644 --- a/Src/Asp.NetCore2/SqlSugar/Realization/MySql/CodeFirst/MySqlCodeFirst.cs +++ b/Src/Asp.NetCore2/SqlSugar/Realization/MySql/CodeFirst/MySqlCodeFirst.cs @@ -123,5 +123,22 @@ namespace SqlSugar } } + + protected override bool IsNoSamgeType(EntityColumnInfo ec, DbColumnInfo dc) + { + if (ec.UnderType==UtilConstants.BoolType && dc.DataType == "tinyint" && dc.Length == 1) + { + return false; + } + else if (ec.UnderType == UtilConstants.DobType && dc.DataType== "double") + { + return false; + } + else if (ec.UnderType == UtilConstants.DateType && dc.DataType?.StartsWith("datetime")==true) + { + return false; + } + return base.IsNoSamgeType(ec, dc); + } } }