File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed
src/main/asciidoc/getting-started Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -121,6 +121,28 @@ This is the bare minimum of what you need to connect to a Neo4j instance.
121121NOTE: It is not necessary to add any programmatic configuration of the driver when you use this starter.
122122SDN repositories will be automatically enabled by this starter.
123123
124+ [[configure-cypher-dsl-dialect]]
125+ === Configure Neo4j Cypher-DSL
126+
127+ Depending on the Neo4j version you are running your application with,
128+ it is advised to configure the dialect Neo4j Cypher-DSL runs with.
129+ The default dialect that is used is targeting Neo4j 4.4. as the LTS version of Neo4j.
130+ This can be changed by defining a Cypher-DSL `Configuration` bean.
131+
132+ .Make Cypher-DSL use the Neo4j 5 dialect
133+ [source,java]
134+ ----
135+ @Bean
136+ Configuration cypherDslConfiguration() {
137+ return Configuration.newConfig()
138+ .withDialect(Dialect.NEO4J_5).build();
139+ }
140+ ----
141+
142+ NOTE: Although Spring Data Neo4j tries it best to be compatible with also the combination of Neo4j 5 and a default dialect,
143+ it is always recommend to explicitly define the dialect.
144+ E.g. it will lead to more optimized queries and make use of `elementId()` for newer Neo4j versions.
145+
124146[[running-on-the-module-path]]
125147== Running on the Module-Path
126148
You can’t perform that action at this time.
0 commit comments