@@ -216,7 +216,7 @@ public long count(String cypherQuery, Map<String, Object> parameters) {
216216 return transactionTemplateReadOnly .execute (tx -> {
217217 PreparedQuery <Long > preparedQuery = PreparedQuery .queryFor (Long .class ).withCypherQuery (cypherQuery )
218218 .withParameters (parameters ).build ();
219- return toQuery (preparedQuery , true ).getRequiredSingleResult ();
219+ return toExecutableQuery (preparedQuery , true ).getRequiredSingleResult ();
220220 });
221221 }
222222
@@ -775,7 +775,7 @@ private <T> ExecutableQuery<T> createExecutableQuery(
775775 .usingMappingFunction (mappingFunction )
776776 .build ();
777777
778- return toQuery (preparedQuery , readOnly );
778+ return toExecutableQuery (preparedQuery , readOnly );
779779 }
780780
781781 /**
@@ -1205,20 +1205,20 @@ public <T> ExecutableQuery<T> toExecutableQuery(Class<T> domainType,
12051205 private <T > ExecutableQuery <T > createExecutableQuery (
12061206 Class <T > domainType , @ Nullable Class <?> resultType ,
12071207 QueryFragmentsAndParameters queryFragmentsAndParameters ,
1208- boolean readOnly ) {
1208+ boolean readOnlyTransaction ) {
12091209
12101210 Supplier <BiFunction <TypeSystem , MapAccessor , ?>> mappingFunction = TemplateSupport
12111211 .getAndDecorateMappingFunction (neo4jMappingContext , domainType , resultType );
12121212 PreparedQuery <T > preparedQuery = PreparedQuery .queryFor (domainType )
12131213 .withQueryFragmentsAndParameters (queryFragmentsAndParameters )
12141214 .usingMappingFunction (mappingFunction )
12151215 .build ();
1216- return toQuery (preparedQuery , readOnly );
1216+ return toExecutableQuery (preparedQuery , readOnlyTransaction );
12171217 }
12181218
12191219 @ Override
12201220 public <T > ExecutableQuery <T > toExecutableQuery (PreparedQuery <T > preparedQuery ) {
1221- return toQuery (preparedQuery , false );
1221+ return toExecutableQuery (preparedQuery , false );
12221222 }
12231223
12241224 private <T > ExecutableQuery <T > toExecutableQuery (PreparedQuery <T > preparedQuery , boolean readOnly ) {
0 commit comments