mysql uint bug

This commit is contained in:
sunkaixuan 2022-09-30 15:49:08 +08:00
parent 112f67c9b8
commit e725ba1360
2 changed files with 12 additions and 0 deletions

View File

@ -58,6 +58,16 @@ namespace OrmTest
{ {
throw new Exception("unit error"); throw new Exception("unit error");
} }
Db.CodeFirst.InitTables<UnitUint>();
Db.Insertable(new UnitUint { Id= 3833200526 }).ExecuteCommand();
var list3=Db.Queryable<UnitUint>().ToList();
}
public class UnitUint
{
[SugarColumn(ColumnDataType = "int unsigned")]
public uint Id { get; set; }
} }
[SugarTable("UnitTest0123", IsCreateTableFiledSort= true)] [SugarTable("UnitTest0123", IsCreateTableFiledSort= true)]

View File

@ -292,6 +292,8 @@ namespace SqlSugar
method = isNullableType ? getConvertByte : getByte; method = isNullableType ? getConvertByte : getByte;
if (bindProperyTypeName.IsContainsIn("int16")) if (bindProperyTypeName.IsContainsIn("int16"))
method = isNullableType ? getConvertInt16 : getInt16; method = isNullableType ? getConvertInt16 : getInt16;
if (bindProperyTypeName == "uint32"&&this.Context.CurrentConnectionConfig.DbType.IsIn(DbType.MySql,DbType.MySqlConnector))
method = null;
break; break;
case CSharpDataType.@bool: case CSharpDataType.@bool:
if (bindProperyTypeName == "bool" || bindProperyTypeName == "boolean") if (bindProperyTypeName == "bool" || bindProperyTypeName == "boolean")