mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-06-19 20:38:16 +08:00
-修复 pgsql jsonb poco 方案联表查询问题;#1549 #1071
This commit is contained in:
@ -1953,6 +1953,13 @@ namespace FreeSql.Internal
|
||||
continue;
|
||||
}
|
||||
var readType = trycol?.Attribute.MapType ?? prop.PropertyType;
|
||||
if (trycol != null && trycol.Attribute.MapType != trycol.CsType) //#1549
|
||||
{
|
||||
var returnTarget86 = Expression.Label(typeof(object));
|
||||
var valueExp86 = Expression.Constant("", typeof(string));
|
||||
if (GetDataReaderValueBlockExpressionSwitchTypeFullName.Any(a => a(returnTarget86, valueExp86, trycol.CsType) != null))
|
||||
readType = trycol.CsType;
|
||||
}
|
||||
var ispkExp = new List<Expression>();
|
||||
var propGetSetMethod = prop.GetSetMethod(true);
|
||||
Expression readVal = Expression.Assign(readpkvalExp, Expression.Call(MethodDataReaderGetValue, new Expression[] { commonUtilExp, rowExp, tryidxExp }));
|
||||
@ -2006,7 +2013,7 @@ namespace FreeSql.Internal
|
||||
}
|
||||
}
|
||||
|
||||
if (trycol != null && trycol.Attribute.MapType != prop.PropertyType)
|
||||
if (trycol != null && readType != prop.PropertyType)
|
||||
ispkExp.Add(Expression.Assign(readExpValue, GetDataReaderValueBlockExpression(prop.PropertyType, readExpValue)));
|
||||
|
||||
ispkExp.Add(
|
||||
|
Reference in New Issue
Block a user