小编Lea*_*ert的帖子

Spring data neo4j cypher方言并非在所有地方都强制执行

升级到 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)

java neo4j kotlin spring-data-neo4j spring-boot

6
推荐指数
0
解决办法
312
查看次数

标签 统计

java ×1

kotlin ×1

neo4j ×1

spring-boot ×1

spring-data-neo4j ×1