Skip to content

Commit d3637d0

Browse files
committed
Use shared cache if ShareStorageSchemaOverNodes + PreferTypeIdsAsQueryParameters
1 parent 12a7555 commit d3637d0

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Orm/Xtensive.Orm/Orm/Internals/CompiledQueryRunner.cs

+5-1
Original file line numberDiff line numberDiff line change
@@ -221,9 +221,13 @@ public CompiledQueryRunner(QueryEndpoint endpoint, object queryKey, object query
221221
domain = session.Domain;
222222

223223
this.endpoint = endpoint;
224-
this.queryKey = new Pair<object, string>(queryKey, session.StorageNodeId);
225224
this.queryTarget = queryTarget;
226225
this.outerContext = outerContext;
226+
227+
var domainConfig = domain.Configuration;
228+
this.queryKey = domainConfig.ShareStorageSchemaOverNodes && domainConfig.PreferTypeIdsAsQueryParameters
229+
? queryKey
230+
: new Pair<object, string>(queryKey, session.StorageNodeId);
227231
}
228232
}
229233
}

0 commit comments

Comments
 (0)