mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-07-17 19:37:34 +08:00
Synchronization code
This commit is contained in:
parent
4e6c29112e
commit
f222671a17
@ -322,7 +322,7 @@ namespace SqlSugar
|
|||||||
while (parentId != null && this.Context.Queryable<T>().AS(tableName).WithCacheIF(this.IsCache, this.CacheTime).Filter(null, this.QueryBuilder.IsDisabledGobalFilter).ClearFilter(this.QueryBuilder.RemoveFilters).In(parentId).Any())
|
while (parentId != null && this.Context.Queryable<T>().AS(tableName).WithCacheIF(this.IsCache, this.CacheTime).Filter(null, this.QueryBuilder.IsDisabledGobalFilter).ClearFilter(this.QueryBuilder.RemoveFilters).In(parentId).Any())
|
||||||
{
|
{
|
||||||
Check.Exception(i > 200, ErrorMessage.GetThrowMessage("Dead cycle", "出现死循环或超出循环上限(200),检查最顶层的ParentId是否是null或者0"));
|
Check.Exception(i > 200, ErrorMessage.GetThrowMessage("Dead cycle", "出现死循环或超出循环上限(200),检查最顶层的ParentId是否是null或者0"));
|
||||||
var parent = this.Context.Queryable<T>().AS(tableName).Filter(null, this.QueryBuilder.IsDisabledGobalFilter).InSingle(parentId);
|
var parent = this.Context.Queryable<T>().AS(tableName).WithCacheIF(this.IsCache, this.CacheTime).Filter(null, this.QueryBuilder.IsDisabledGobalFilter).InSingle(parentId);
|
||||||
result.Add(parent);
|
result.Add(parent);
|
||||||
parentId = ParentInfo.PropertyInfo.GetValue(parent, null);
|
parentId = ParentInfo.PropertyInfo.GetValue(parent, null);
|
||||||
++i;
|
++i;
|
||||||
|
Loading…
Reference in New Issue
Block a user