mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-06-20 04:48:16 +08:00
- 修复 3.2.689 WithTempQuery DTO 映射查询问题;#1441 #1436 #1434 #1433 #1431 #1429 #1427 #1425 #1417 #1413 #1412 #1319
This commit is contained in:
@ -2514,7 +2514,8 @@ namespace FreeSql.Internal
|
||||
{
|
||||
if (tb == null || dtoProp == null || tb.Parameter == null) return null;
|
||||
var retList = new List<Expression[]>();
|
||||
LocalMatch(tb.Parameter.Type, tb.Parameter);
|
||||
var retExp = LocalMatch(tb.Parameter.Type, tb.Parameter);
|
||||
if (retList.Any() == false) retList.Add(new[] { retExp });
|
||||
return retList;
|
||||
|
||||
Expression LocalMatch(Type type, Expression memExp)
|
||||
|
@ -632,7 +632,7 @@ namespace FreeSql.Internal
|
||||
var propTypeIsObservableCollection = propElementType != null && pnv.PropertyType == typeof(ObservableCollection<>).MakeGenericType(propElementType);
|
||||
|
||||
#region islazy
|
||||
void LocalManyLazyLoadingCode(PropertyInfo refprop, string cscodeExtLogic1, string cscodeExtLogic2, string lmbdWhere)
|
||||
void LocalOneToManyLazyLoadingCode(PropertyInfo refprop, string cscodeExtLogic1, string cscodeExtLogic2, string lmbdWhere)
|
||||
{
|
||||
cscode.Append(" private bool __lazy__").Append(pnv.Name).AppendLine(" = false;")
|
||||
.Append(" ").Append(propModification).Append(" override ").Append(propTypeName).Append(" ").Append(pnv.Name).AppendLine(" {");
|
||||
@ -768,7 +768,7 @@ namespace FreeSql.Internal
|
||||
nvref.RefType = TableRefType.OneToMany;
|
||||
trytb.AddOrUpdateTableRef(pnv.Name, nvref);
|
||||
}
|
||||
if (isLazy) LocalManyLazyLoadingCode(null, null, null, lmbdWhere.ToString());
|
||||
if (isLazy) LocalOneToManyLazyLoadingCode(null, null, null, lmbdWhere.ToString());
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -802,6 +802,7 @@ namespace FreeSql.Internal
|
||||
}
|
||||
if (isLazy) LocalLazyLoadingCode(lmbdWhere.ToString());
|
||||
}
|
||||
return;
|
||||
}
|
||||
#endregion
|
||||
|
||||
@ -1401,7 +1402,7 @@ namespace FreeSql.Internal
|
||||
}
|
||||
|
||||
}
|
||||
if (isLazy) LocalManyLazyLoadingCode(refprop, cscodeExtLogic1, cscodeExtLogic2, lmbdWhere.ToString());
|
||||
if (isLazy) LocalOneToManyLazyLoadingCode(refprop, cscodeExtLogic1, cscodeExtLogic2, lmbdWhere.ToString());
|
||||
}
|
||||
}
|
||||
else
|
||||
|
Reference in New Issue
Block a user