修复仅分库对象

This commit is contained in:
xuejiaming 2022-12-09 21:12:50 +08:00
parent ba42a43e65
commit 2f72a5c418
1 changed files with 1 additions and 2 deletions

View File

@ -54,7 +54,7 @@ namespace ShardingCore.Core.VirtualRoutes.TableRoutes.RoutingRuleEngine
var queryEntities = tableRouteRuleContext.QueryEntities; var queryEntities = tableRouteRuleContext.QueryEntities;
bool onlyShardingDataSource = true; bool onlyShardingDataSource = queryEntities.All(o=>_entityMetadataManager.IsOnlyShardingDataSource(o.Key));
foreach (var shardingEntityKv in queryEntities) foreach (var shardingEntityKv in queryEntities)
{ {
var shardingEntity = shardingEntityKv.Key; var shardingEntity = shardingEntityKv.Key;
@ -63,7 +63,6 @@ namespace ShardingCore.Core.VirtualRoutes.TableRoutes.RoutingRuleEngine
continue; continue;
} }
onlyShardingDataSource = false;
var shardingRouteUnits = GetEntityRouteUnit(tableRouteRuleContext.DataSourceRouteResult, shardingEntity, var shardingRouteUnits = GetEntityRouteUnit(tableRouteRuleContext.DataSourceRouteResult, shardingEntity,
shardingEntityKv.Value ?? tableRouteRuleContext.Queryable); shardingEntityKv.Value ?? tableRouteRuleContext.Queryable);