@@ -216,7 +216,7 @@ public long count(String cypherQuery, Map<String, Object> parameters) {
216
216
return transactionTemplateReadOnly .execute (tx -> {
217
217
PreparedQuery <Long > preparedQuery = PreparedQuery .queryFor (Long .class ).withCypherQuery (cypherQuery )
218
218
.withParameters (parameters ).build ();
219
- return toQuery (preparedQuery , true ).getRequiredSingleResult ();
219
+ return toExecutableQuery (preparedQuery , true ).getRequiredSingleResult ();
220
220
});
221
221
}
222
222
@@ -775,7 +775,7 @@ private <T> ExecutableQuery<T> createExecutableQuery(
775
775
.usingMappingFunction (mappingFunction )
776
776
.build ();
777
777
778
- return toQuery (preparedQuery , readOnly );
778
+ return toExecutableQuery (preparedQuery , readOnly );
779
779
}
780
780
781
781
/**
@@ -1205,20 +1205,20 @@ public <T> ExecutableQuery<T> toExecutableQuery(Class<T> domainType,
1205
1205
private <T > ExecutableQuery <T > createExecutableQuery (
1206
1206
Class <T > domainType , @ Nullable Class <?> resultType ,
1207
1207
QueryFragmentsAndParameters queryFragmentsAndParameters ,
1208
- boolean readOnly ) {
1208
+ boolean readOnlyTransaction ) {
1209
1209
1210
1210
Supplier <BiFunction <TypeSystem , MapAccessor , ?>> mappingFunction = TemplateSupport
1211
1211
.getAndDecorateMappingFunction (neo4jMappingContext , domainType , resultType );
1212
1212
PreparedQuery <T > preparedQuery = PreparedQuery .queryFor (domainType )
1213
1213
.withQueryFragmentsAndParameters (queryFragmentsAndParameters )
1214
1214
.usingMappingFunction (mappingFunction )
1215
1215
.build ();
1216
- return toQuery (preparedQuery , readOnly );
1216
+ return toExecutableQuery (preparedQuery , readOnlyTransaction );
1217
1217
}
1218
1218
1219
1219
@ Override
1220
1220
public <T > ExecutableQuery <T > toExecutableQuery (PreparedQuery <T > preparedQuery ) {
1221
- return toQuery (preparedQuery , false );
1221
+ return toExecutableQuery (preparedQuery , false );
1222
1222
}
1223
1223
1224
1224
private <T > ExecutableQuery <T > toExecutableQuery (PreparedQuery <T > preparedQuery , boolean readOnly ) {
0 commit comments