我们一直在尝试编写一个 C# 客户端,为 Neo4j 实例提供一些节点和关系。在尝试创建关系属性时,我们面临着问题。
以下是使用标志属性创建关系的代码:
var s = clientConnection.CreateRelationship(root, new RelationshipPrincipleToContent("SECURITY", rootFolder) { flags = "+W" });
这是关系类:
public class RelationshipPrincipleToContent : Relationship, IRelationshipAllowingSourceNode<Principles>, IRelationshipAllowingTargetNode<Content>{
public string flags { get; set; }
string RelationshipName;
public RelationshipPrincipleToContent(NodeReference targetNode) : base(targetNode){}
public RelationshipPrincipleToContent(string RelationshipName, NodeReference targetNode): base(targetNode){
this.RelationshipName = RelationshipName;
}
public override string RelationshipTypeKey{
get { return RelationshipName; }
}
}
当我们在数据浏览器选项卡中查看数据时,关系上没有任何属性。我们还创建了关系索引?
我们错过了什么/做错了什么?