动态获取Node Neo4j的属性

问题描述 投票:0回答:1

这是我的Neo4jRepository方法

@Query("match (pofr:NODE) where pofr.param1= {param1} return pofr.{param2}, pofr.param3")
    List<Node> getPropertiesOfNode(@Param("param1") String param1, @Param("param2") String param2);

ExceptionLogs:

    Error executing Cypher; Code: Neo.ClientError.Statement.SyntaxError; Description: Invalid input '{': expected an identifier, whitespace, a function name or a property key name (line 1, column 64 (offset: 63))
"match (pofr:NODE) where pofr.param1 = {param1} return pofr.{param2}, pofr.param3"
                                                                ^; nested exception is org.neo4j.ogm.exception.CypherException: Error executing Cypher; Code: Neo.ClientError.Statement.SyntaxError; Description: Invalid input '{': expected an identifier, whitespace, a function name or a property key name (line 1, column 64 (offset: 63))

我试图动态填充属性数据时遇到问题。我们还有其他方法可以实现这一目标吗?

spring-data-neo4j
1个回答
0
投票

由于Cypher不支持这些位置的占位符,遗憾的是在Spring Data Neo4j中无法解决这个问题。

© www.soinside.com 2019 - 2024. All rights reserved.