我尝试使用F#中的Neo4jClient查询特定节点的计数相关节点。但继续收到以下错误:
System.MissingMethodException:找不到方法:' System.Type Newtonsoft.Json.JsonContainerAttribute.get_NamingStrategyType()'。
我在包的文档中找不到答案。使用lambda函数进行过滤可以在" select"阶段但不在"其中"。
[<CLIMutable>]
type User = { id : int; followers : int }
let tweetsCounted =
client.Cypher
.Match("(u:User)-[:POSTED]->(t:Tweet)")
.Where(fun u -> u.followers = 1000)
.Return(fun (u : Cypher.ICypherResultItem) (t : Cypher.ICypherResultItem) -> u.As<User>(), t.Count())
.Results
.Select(fun (x, y) -> x.id, y)
答案 0 :(得分:0)
这个问题有一个答案。
我添加了单元测试来测试F#与Subrt
和WHERE
子句的功能,并按预期传递(参见http://github.com/Readify/Neo4jClient/pull/270)。
@AnotherNewbie提到的错误在他们的环境中不再可再现。