升级到 Neo4j v5.9.0 时,我尝试通过创建以下配置来强制执行 Neo4j v5 方言,如文档所示
import org.neo4j.cypherdsl.core.renderer.Dialect
import org.springframework.context.annotation.Bean
import org.springframework.context.annotation.Configuration
import org.neo4j.cypherdsl.core.renderer.Configuration as CypherConfiguration
@Configuration
class Neo4jConfiguration {
@Bean
fun cypherDslConfiguration(): CypherConfiguration =
CypherConfiguration.newConfig().withDialect(Dialect.NEO4J_5).build()
}
Run Code Online (Sandbox Code Playgroud)
当从弹簧执行器检查时,似乎存在以下 bean
"cypherDslConfiguration": {
"aliases": [],
"scope": "singleton",
"type": "org.neo4j.cypherdsl.core.renderer.Configuration",
"resource": "class path resource [com/foo/infra/neo4j/Neo4jConfiguration.class]",
"dependencies": [
"neo4jConfiguration"
]
}
Run Code Online (Sandbox Code Playgroud)
当使用存储库查询时,我仍然收到来自各种不同查询的以下警告
Neo.ClientNotification.Statement.FeatureDeprecationWarning: This feature is deprecated and will be removed in future versions.
UNWIND $__relationships__ AS relationship WITH relationship MATCH (startNode:`MyNode`) WHERE startNode.entityId = relationship.fromId MATCH (endNode) WHERE id(endNode) = relationship.toId MERGE …Run Code Online (Sandbox Code Playgroud)