在動態查詢返回多值之後,我問了一個問題: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.)
是否有可能僅使用字符串返回多個節點?
您的第一個解決方案是我所需要的,因爲它保持了查詢的動態性質,非常感謝! –