这是我的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))
我试图动态填充属性数据时遇到问题。我们还有其他方法可以实现这一目标吗?
由于Cypher不支持这些位置的占位符,遗憾的是在Spring Data Neo4j中无法解决这个问题。