在动态查询返回多值之后,我问了一个问题:Build a dynamic query using neo4j client使用Neo4j的客户
我得到了我如何动态仅仅使用了字符串返回值的答案。
当我尝试使用语法从失败的查询返回多值,
我尝试以下查询:
var resQuery2 = WebApiConfig.GraphClient.Cypher
.Match("(movie:Movie {title:{title}})")
.OptionalMatch("(movie)<-[r]-(person:Person)")
.WithParam("title", title)
.Return(() => Return.As<string>("movie, collect([person.name, head(split(lower(type(r)), '_')), r.roles])"));
,我发现了以下错误:
The deserializer is running in single column mode, but the response included multiple columns which indicates a projection instead. If using the fluent Cypher interface, use the overload of Return that takes a lambda or object instead of single string. (The overload with a single string is for an identity, not raw query text: we can't map the columns back out if you just supply raw query text.)
是否有可能仅使用字符串返回多个节点?
您的第一个解决方案是我所需要的,因为它保持了查询的动态性质,非常感谢! –