diff --git a/docs/src/main/java/io/helidon/docs/mp/integrations/Neo4jSnippets.java b/docs/src/main/java/io/helidon/docs/mp/integrations/Neo4jSnippets.java index adcc6d61104..99ea76cfb20 100644 --- a/docs/src/main/java/io/helidon/docs/mp/integrations/Neo4jSnippets.java +++ b/docs/src/main/java/io/helidon/docs/mp/integrations/Neo4jSnippets.java @@ -84,7 +84,7 @@ List findAll() { // <2> return m, collect(d) as directors, collect({name:a.name, roles: r.roles}) as actors """; - return session.readTransaction(tx -> tx.run(query).list(r -> { + return session.executeRead(tx -> tx.run(query).list(r -> { var movieNode = r.get("m").asNode(); var directors = r.get("directors").asList(v -> { diff --git a/docs/src/main/java/io/helidon/docs/se/integrations/Neo4jSnippets.java b/docs/src/main/java/io/helidon/docs/se/integrations/Neo4jSnippets.java index 787c1383eb9..d4806480ed4 100644 --- a/docs/src/main/java/io/helidon/docs/se/integrations/Neo4jSnippets.java +++ b/docs/src/main/java/io/helidon/docs/se/integrations/Neo4jSnippets.java @@ -66,7 +66,7 @@ List findAll() { // <2> return m, collect(d) as directors, collect({name:a.name, roles: r.roles}) as actors """; - return session.readTransaction(tx -> tx.run(query).list(r -> { + return session.executeRead(tx -> tx.run(query).list(r -> { var movieNode = r.get("m").asNode(); var directors = r.get("directors").asList(v -> { diff --git a/examples/integrations/neo4j/src/main/java/io/helidon/examples/integrations/neo4j/domain/MovieRepository.java b/examples/integrations/neo4j/src/main/java/io/helidon/examples/integrations/neo4j/domain/MovieRepository.java index 40a2c4833f2..c7b6e3bcffd 100644 --- a/examples/integrations/neo4j/src/main/java/io/helidon/examples/integrations/neo4j/domain/MovieRepository.java +++ b/examples/integrations/neo4j/src/main/java/io/helidon/examples/integrations/neo4j/domain/MovieRepository.java @@ -26,7 +26,7 @@ /* * Helidon changes are under the copyright of: * - * Copyright (c) 2021, 2023 Oracle and/or its affiliates. + * Copyright (c) 2021, 2024 Oracle and/or its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -74,7 +74,7 @@ public List findAll(){ + "match (m) <- [r:ACTED_IN] - (a:Person) " + "return m, collect(d) as directors, collect({name:a.name, roles: r.roles}) as actors"; - return session.readTransaction(tx -> tx.run(query).list(r -> { + return session.executeRead(tx -> tx.run(query).list(r -> { var movieNode = r.get("m").asNode(); var directors = r.get("directors").asList(v -> {