|
|
@@ -54,6 +54,14 @@ public static class SqlSugarSetup
|
|
|
column.IsNullable = true;
|
|
|
if (config.EnableUnderLine && !column.IsIgnore && !column.DbColumnName.Contains('_'))
|
|
|
column.DbColumnName = UtilMethods.ToUnderLine(column.DbColumnName); // 驼峰转下划线
|
|
|
+
|
|
|
+ if (config.DbType == SqlSugar.DbType.Oracle) ///修复默认的SqlSugar.CodeFirst.InitTables方法C#类型转Oracle数据库类型时long、bool类型没有位数精度的bug
|
|
|
+ {
|
|
|
+ if (type.PropertyType == typeof(long) || type.PropertyType == typeof(long?))
|
|
|
+ column.DataType = "number(18)";
|
|
|
+ if (type.PropertyType == typeof(bool) || type.PropertyType == typeof(bool?))
|
|
|
+ column.DataType = "number(1)";
|
|
|
+ }
|
|
|
},
|
|
|
DataInfoCacheService = new SqlSugarCache(),
|
|
|
};
|