Property set method not found #132

This commit is contained in:
28810 2019-11-18 19:12:50 +08:00
parent 94e51d1dff
commit acd406164a

View File

@ -251,7 +251,7 @@ namespace FreeSql.Internal
var objval = ReadAnonymous(parent.Childs[b], dr, ref index, notRead);
if (isnull == false && objval == null && parent.Table != null && parent.Table.ColumnsByCs.TryGetValue(parent.Childs[b].CsName, out var trycol) && trycol.Attribute.IsPrimary)
isnull = true;
if (isnull == false)
if (isnull == false && prop.CanWrite)
prop.SetValue(ret, objval, null);
}
return isnull ? null : ret;