0
节点已存在。 我试图通过放松添加边缘,但我的功能importBuyConnectionIntoNeo4j
没有工作,如何通过使用neo4jclient展开来添加边?
有没有人可以帮助我?
的数据结构:
class Connection
{
private string type;
public string Type
{
get { return type; }
set { type = value; }
}
private string source;
public string Source
{
get { return source; }
set { source = value; }
}
private string target;
public string Target
{
get { return target; }
set { target = value; }
}
}
class BuyConnection:Connection
{
}
myFunction的:
public void importBuyConnectionIntoNeo4j(List<BuyConnection> connectionList)
{
GraphClient client = createConnectionToNeo4j();
client.Cypher
.Unwind(connectionList, "connection")
.Match("(source:Person),(target:Vegetable)")
.Where("source.Name=connection.Source AND target.Type=connection.Target")
.Create("(source)-[:Buy]->(target)")
.ExecuteWithoutResults();
}
你好,它怎么不起作用?只是不建立关系? –
是的,没有创建任何关系。在此操作之前,我导入了一些节点。 –