- 修改 Query 查询的实体设置了 IsIgnore 时,可能出现 ET 读取位置偏移 bug;

This commit is contained in:
28810
2019-05-13 17:59:27 +08:00
parent 79e21295c3
commit 5fe35f67e9
5 changed files with 87 additions and 63 deletions

View File

@ -941,7 +941,10 @@ namespace FreeSql.Internal {
var props = type.GetProperties();//.ToDictionary(a => a.Name, a => a, StringComparer.CurrentCultureIgnoreCase);
var propIndex = 0;
foreach (var prop in props) {
if (typetb.ColumnsByCsIgnore.ContainsKey(prop.Name)) continue;
if (typetb.ColumnsByCsIgnore.ContainsKey(prop.Name)) {
++propIndex;
continue;
}
var readType = typetb.ColumnsByCs.TryGetValue(prop.Name, out var trycol) ? trycol.Attribute.MapType : prop.PropertyType;
var ispkExp = new List<Expression>();