mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-11-08 02:14:53 +08:00
Merge branch 'SqlSugar5' of github.com:donet5/SqlSugar
This commit is contained in:
@@ -258,17 +258,7 @@ namespace SqlSugar
|
||||
}
|
||||
else
|
||||
{
|
||||
if (sugarColumn.IsJson && String.IsNullOrEmpty(sugarColumn.ColumnDataType))
|
||||
{
|
||||
if (this.Context.CurrentConnectionConfig.DbType == DbType.PostgreSQL)
|
||||
{
|
||||
column.DataType = "json";
|
||||
}
|
||||
else
|
||||
{
|
||||
column.DataType = "varchar(4000)";
|
||||
}
|
||||
}
|
||||
|
||||
if (sugarColumn.IsIgnore == false)
|
||||
{
|
||||
column.DbColumnName = sugarColumn.ColumnName.IsNullOrEmpty() ? property.Name : sugarColumn.ColumnName;
|
||||
@@ -294,6 +284,18 @@ namespace SqlSugar
|
||||
column.IsArray = sugarColumn.IsArray;
|
||||
column.IsTreeKey = sugarColumn.IsTreeKey;
|
||||
column.SqlParameterDbType = sugarColumn.SqlParameterDbType;
|
||||
|
||||
if (sugarColumn.IsJson && String.IsNullOrEmpty(sugarColumn.ColumnDataType))
|
||||
{
|
||||
if (this.Context.CurrentConnectionConfig.DbType == DbType.PostgreSQL)
|
||||
{
|
||||
column.DataType = "json";
|
||||
}
|
||||
else
|
||||
{
|
||||
column.DataType = "varchar(4000)";
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -258,17 +258,7 @@ namespace SqlSugar
|
||||
}
|
||||
else
|
||||
{
|
||||
if (sugarColumn.IsJson && String.IsNullOrEmpty(sugarColumn.ColumnDataType))
|
||||
{
|
||||
if (this.Context.CurrentConnectionConfig.DbType == DbType.PostgreSQL)
|
||||
{
|
||||
column.DataType = "json";
|
||||
}
|
||||
else
|
||||
{
|
||||
column.DataType = "varchar(4000)";
|
||||
}
|
||||
}
|
||||
|
||||
if (sugarColumn.IsIgnore == false)
|
||||
{
|
||||
column.DbColumnName = sugarColumn.ColumnName.IsNullOrEmpty() ? property.Name : sugarColumn.ColumnName;
|
||||
@@ -294,6 +284,17 @@ namespace SqlSugar
|
||||
column.IsArray = sugarColumn.IsArray;
|
||||
column.IsTreeKey = sugarColumn.IsTreeKey;
|
||||
column.SqlParameterDbType = sugarColumn.SqlParameterDbType;
|
||||
if (sugarColumn.IsJson && String.IsNullOrEmpty(sugarColumn.ColumnDataType))
|
||||
{
|
||||
if (this.Context.CurrentConnectionConfig.DbType == DbType.PostgreSQL)
|
||||
{
|
||||
column.DataType = "json";
|
||||
}
|
||||
else
|
||||
{
|
||||
column.DataType = "varchar(4000)";
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user