- 修复 MySql 子查询 Enum MapType(int) 表达式判断解析 bug;#1118

This commit is contained in:
2881099
2022-05-24 17:16:40 +08:00
parent 0ea5c5d966
commit 2234012993
3 changed files with 311 additions and 1 deletions

View File

@ -648,7 +648,11 @@ namespace FreeSql.Internal
{
var enumType = leftMapColumn.CsType.NullableTypeOrThis();
if (enumType.IsEnum)
right = formatSql(Enum.Parse(enumType, right.StartsWith("N'") ? right.Substring(1).Trim('\'') : right.Trim('\'')), leftMapColumn.Attribute.MapType, leftMapColumn, tsc.dbParams);
{
rightMapColumn = SearchColumnByField(tsc._tables, tsc.currentTable, right);
if (rightMapColumn != null)
right = formatSql(Enum.Parse(enumType, right.StartsWith("N'") ? right.Substring(1).Trim('\'') : right.Trim('\'')), leftMapColumn.Attribute.MapType, leftMapColumn, tsc.dbParams);
}
}
if (leftMapColumn == null)
{