mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-05-17 21:49:33 +08:00
Synchronization code
This commit is contained in:
parent
6ebc2c5b47
commit
28b06a3dae
@ -40,7 +40,7 @@ namespace SqlSugar
|
|||||||
|
|
||||||
|
|
||||||
var childList = GetChildList<TChild>().In(thisPkColumn.DbColumnName, bids).ToList();
|
var childList = GetChildList<TChild>().In(thisPkColumn.DbColumnName, bids).ToList();
|
||||||
if (bids.Count != childList.Count)
|
if (_WhereList.HasValue())
|
||||||
{
|
{
|
||||||
bids = childList.Select(it => thisPkColumn.PropertyInfo.GetValue(it)).ToList();
|
bids = childList.Select(it => thisPkColumn.PropertyInfo.GetValue(it)).ToList();
|
||||||
}
|
}
|
||||||
@ -55,9 +55,20 @@ namespace SqlSugar
|
|||||||
this._ParentPkColumn = thisPkColumn;
|
this._ParentPkColumn = thisPkColumn;
|
||||||
this._IsDeletedParant = true;
|
this._IsDeletedParant = true;
|
||||||
|
|
||||||
|
|
||||||
|
if (_WhereList.HasValue())
|
||||||
|
{
|
||||||
|
SetContext(() => _Context.Deleteable<object>().AS(mappingEntity.DbTableName)
|
||||||
|
.In(mappingA.DbColumnName, aids)
|
||||||
|
.In(mappingB.DbColumnName, bids)
|
||||||
|
.ExecuteCommand());
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
SetContext(() => _Context.Deleteable<object>().AS(mappingEntity.DbTableName).In(
|
SetContext(() => _Context.Deleteable<object>().AS(mappingEntity.DbTableName).In(
|
||||||
mappingA.DbColumnName, aids
|
mappingA.DbColumnName, aids
|
||||||
).ExecuteCommand());
|
).ExecuteCommand());
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
<package >
|
<package >
|
||||||
<metadata>
|
<metadata>
|
||||||
<id>SqlSugarCore</id>
|
<id>SqlSugarCore</id>
|
||||||
<version>5.0.9.5-preview03</version>
|
<version>5.0.9.5-preview04</version>
|
||||||
<authors>sunkaixuan</authors>
|
<authors>sunkaixuan</authors>
|
||||||
<owners>果糖大数据科技</owners>
|
<owners>果糖大数据科技</owners>
|
||||||
<licenseUrl>http://www.apache.org/licenses/LICENSE-2.0.html</licenseUrl>
|
<licenseUrl>http://www.apache.org/licenses/LICENSE-2.0.html</licenseUrl>
|
||||||
|
Loading…
Reference in New Issue
Block a user