mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-06-19 04:18:16 +08:00
- 修复 LazyLoading 依赖项目 CSScript.Core 升级的 bug;(以上都不再升级该依赖)
This commit is contained in:
@ -78,7 +78,7 @@ namespace FreeSql
|
||||
if (item == null) return;
|
||||
var itemType = item.GetType();
|
||||
if (itemType == typeof(object)) return;
|
||||
if (itemType.FullName.StartsWith("Submission#")) itemType = itemType.BaseType;
|
||||
if (itemType.FullName.Contains("FreeSqlLazyEntity__")) itemType = itemType.BaseType;
|
||||
if (_db.Orm.CodeFirst.GetTableByEntity(itemType)?.Primarys.Any() != true) return;
|
||||
var dbset = _db.Set(itemType);
|
||||
dbset?.GetType().GetMethod("TrackToList", BindingFlags.Instance | BindingFlags.NonPublic).Invoke(dbset, new object[] { list });
|
||||
|
@ -277,9 +277,9 @@ namespace FreeSql
|
||||
var isEquals = true;
|
||||
for (var midcolidx = tref.Columns.Count; midcolidx < tref.MiddleColumns.Count; midcolidx++)
|
||||
{
|
||||
var refcol = tref.Columns[midcolidx - tref.Columns.Count];
|
||||
var refcol = tref.RefColumns[midcolidx - tref.Columns.Count];
|
||||
var midval = FreeSql.Internal.Utils.GetDataReaderValue(refcol.CsType, _db.Orm.GetEntityValueWithPropertyName(tref.RefMiddleEntityType, midItem, tref.MiddleColumns[midcolidx].CsName));
|
||||
var refval = FreeSql.Internal.Utils.GetDataReaderValue(refcol.CsType, _db.Orm.GetEntityValueWithPropertyName(tref.RefEntityType, curList[curIdx], tref.Columns[midcolidx - tref.Columns.Count].CsName));
|
||||
var refval = FreeSql.Internal.Utils.GetDataReaderValue(refcol.CsType, _db.Orm.GetEntityValueWithPropertyName(tref.RefEntityType, curList[curIdx], refcol.CsName));
|
||||
if (object.Equals(midval, refval) == false)
|
||||
{
|
||||
isEquals = false;
|
||||
|
Reference in New Issue
Block a user