Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/neo4j/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Neo4j Cypher查询返回创建错误异常_Neo4j_Cypher_Neo4jclient - Fatal编程技术网

Neo4j Cypher查询返回创建错误异常

Neo4j Cypher查询返回创建错误异常,neo4j,cypher,neo4jclient,Neo4j,Cypher,Neo4jclient,当我尝试从Neo4JClient中的cyper查询中获取结果时,出现以下错误 错误: Neo4jClient encountered an exception while deserializing the response from the server. This is likely a bug in Neo4jClient. Please open an issue at https://bitbucket.org/Readify/neo4jclient/issues/new

当我尝试从Neo4JClient中的cyper查询中获取结果时,出现以下错误

错误:

Neo4jClient encountered an exception while deserializing the response from the server. This is likely a bug in Neo4jClient.    
Please open an issue at https://bitbucket.org/Readify/neo4jclient/issues/new    
To get a reply, and track your issue, ensure you are logged in on BitBucket before submitting.    
Include the full text of this exception, including this message, the stack trace, and all of the inner exception details.    

Include the full type definition of <>f__AnonymousType3`2[[Neo4jClient.Node`1[[IQS_ACL.Nodes.User, IQS ACL, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]], Neo4jClient, Version=1.0.0.594, Culture=neutral, PublicKeyToken=null],[Neo4jClient.Node`1[[IQS_ACL.Nodes.SecurityRelationshipObject, IQS ACL, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]], Neo4jClient, Version=1.0.0.594, Culture=neutral, PublicKeyToken=null]].

Include this raw JSON, with any sensitive values replaced with non-sensitive equivalents:    

{    
  "columns" : [ "Node", "Rels" ],    
  "data" : [ [ {    
    "paged_traverse" : "http://localhost:7474/db/data/node/7690/paged/traverse/{returnType}{?pageSize,leaseTime}",    
    "outgoing_relationships" : "http://localhost:7474/db/data/node/7690/relationships/out",    
    "data" : {    
      "Name" : "root"    
    },    
    "traverse" : "http://localhost:7474/db/data/node/7690/traverse/{returnType}",    
    "all_typed_relationships" : "http://localhost:7474/db/data/node/7690/relationships/all/{-list|&|types}",    
    "all_relationships" : "http://localhost:7474/db/data/node/7690/relationships/all",    
    "property" : "http://localhost:7474/db/data/node/7690/properties/{key}",    
    "self" : "http://localhost:7474/db/data/node/7690",    
    "properties" : "http://localhost:7474/db/data/node/7690/properties",    
    "outgoing_typed_relationships" : "http://localhost:7474/db/data/node/7690/relationships/out/{-list|&|types}",    
    "incoming_relationships" : "http://localhost:7474/db/data/node/7690/relationships/in",    
    "incoming_typed_relationships" : "http://localhost:7474/db/data/node/7690/relationships/in/{-list|&|types}",    
    "extensions" : {    
    },    
    "create_relationship" : "http://localhost:7474/db/data/node/7690/relationships"    
  }, {    
    "start" : "http://localhost:7474/db/data/node/7690",    
    "data" : {    
      "W" : 3,    
      "R" : 3,    
      "ReadablePermissions" : "+R+W",    
      "X" : 1    
    },    
    "property" : "http://localhost:7474/db/data/relationship/9351/properties/{key}",    
    "self" : "http://localhost:7474/db/data/relationship/9351",    
    "properties" : "http://localhost:7474/db/data/relationship/9351/properties",    
    "type" : "SECURITY",    
    "extensions" : {    
    },    
    "end" : "http://localhost:7474/db/data/node/7696"    
  } ], [ {    
    "paged_traverse" : "http://localhost:7474/db/data/node/7690/paged/traverse/{returnType}{?pageSize,leaseTime}",    
    "outgoing_relationships" : "http://localhost:7474/db/data/node/7690/relationships/out",    
    "data" : {    
      "Name" : "root"    
    },    
    "traverse" : "http://localhost:7474/db/data/node/7690/traverse/{returnType}",    
    "all_typed_relationships" : "http://localhost:7474/db/data/node/7690/relationships/all/{-list|&|types}",    
    "all_relationships" : "http://localhost:7474/db/data/node/7690/relationships/all",    
    "property" : "http://localhost:7474/db/data/node/7690/properties/{key}",    
    "self" : "http://localhost:7474/db/data/node/7690",    
    "properties" : "http://localhost:7474/db/data/node/7690/properties",    
    "outgoing_typed_relationships" : "http://localhost:7474/db/data/node/7690/relationships/out/{-list|&|types}",    
    "incoming_relationships" : "http://localhost:7474/db/data/node/7690/relationships/in",    
    "incoming_typed_relationships" : "http://localhost:7474/db/data/node/7690/relationships/in/{-list|&|types}",    
    "extensions" : {    
    },    
    "create_relationship" : "http://localhost:7474/db/data/node/7690/relationships"    
  }, {    
    "start" : "http://localhost:7474/db/data/node/7690",
    "data" : {
      "W" : 3,
      "R" : 3,
      "ReadablePermissions" : "+R+W",
      "X" : 1
    },
    "property" : "http://localhost:7474/db/data/relationship/9351/properties/{key}",
    "self" : "http://localhost:7474/db/data/relationship/9351",
    "properties" : "http://localhost:7474/db/data/relationship/9351/properties",
    "type" : "SECURITY",
    "extensions" : {
    },
    "end" : "http://localhost:7474/db/data/node/7696"
  } ] ]}
var groups = clientConnection.Cypher
                .Start(new { n = "node(" + folderID + ")" })
                .Match("n<-[r:SECURITY]-x, x<-[v:IS_MEMBER_OF_GROUP*]-b where b.Name = '"+userName+"'")
                .ReturnDistinct((x, r) => new
                {
                    Node = x.As<Node<User>>(),
                    Rels = r.As<Node<SecurityRelationshipObject>>()
                });

var results = groups.Results;
It throws on the .Results();
public class User
{
    //CMIS Object Properties
    public string ObjectId { get; set; }
    public string BaseTypeId { get; set; }
    public string ObjectTypeId { get; set; }
    public IList<string> SecondaryObjectTypeIds { get; set; }
    public string Name { get; set; }
    public string Description { get; set; }
    public string CreatedBy { get; set; }
    public string CreationDate { get; set; }
    public string LastModifiedBy { get; set; }
    public string LastModificationDate { get; set; }
    public string ChangeToken { get; set; }
}

public class UserGroup
{
    //CMIS Object Properties
    public string ObjectId { get; set; }
    public string BaseTypeId { get; set; }
    public string ObjectTypeId { get; set; }
    public IList<string> SecondaryObjectTypeIds { get; set; }
    public string Name { get; set; }
    public string Description { get; set; }
    public string CreatedBy { get; set; }
    public string CreationDate { get; set; }
    public string LastModifiedBy { get; set; }
    public string LastModificationDate { get; set; }
    public string ChangeToken { get; set; }
}

public class RelationshipObject
{
    //CMIS Object Properties
    public string ObjectId { get; set; }
    public string BaseTypeId { get; set; }
    public string ObjectTypeId { get; set; }
    public Array SecondaryObjectTypeIds { get; set; }
    public string Name { get; set; }
    public string Description { get; set; }
    public string CreatedBy { get; set; }
    public string CreationDate { get; set; }
    public string LastModifiedBy { get; set; }
    public string LastModificationDate { get; set; }
    public string ChangeToken { get; set; }

    //RelationshipObject Properties
    public string sourceId { get; set; }
    public string targetId { get; set; }
}

public class SecurityRelationshipObject : RelationshipObject
{
    //CMIS Object Properties
    public IList<string> SecondaryObjectTypeIds { get; set; }
    public string ReadablePermissions { get; set; }
    public int R { get; set; }
    public int W { get; set; }
    public int X { get; set; }
}
public class RelationshipUserGroupToFolder: Relationship<SecurityRelationshipObject>, IRelationshipAllowingSourceNode<UserGroup>, IRelationshipAllowingTargetNode<FolderObject>
{
    string RelationshipName;

    public RelationshipUserGroupToFolder(string RelationshipName, NodeReference targetNode, SecurityRelationshipObject relationshipTypeObject)
        : base(targetNode, relationshipTypeObject)
    {
        this.RelationshipName = RelationshipName;
    }

    public override string RelationshipTypeKey
    {
        get { return RelationshipName; }
    }
}

public class RelationshipUserGroupToUserGroup : Relationship<RelationshipObject>, IRelationshipAllowingSourceNode<UserGroup>, IRelationshipAllowingTargetNode<UserGroup>
{
    string RelationshipName;

    public RelationshipUserGroupToUserGroup(string RelationshipName, NodeReference targetNode, RelationshipObject relationshipTypeObject)
        : base(targetNode, relationshipTypeObject)
    {
        this.RelationshipName = RelationshipName;
    }

    public override string RelationshipTypeKey
    {
        get { return RelationshipName; }
    }
}
比特桶票据:

类定义:

Neo4jClient encountered an exception while deserializing the response from the server. This is likely a bug in Neo4jClient.    
Please open an issue at https://bitbucket.org/Readify/neo4jclient/issues/new    
To get a reply, and track your issue, ensure you are logged in on BitBucket before submitting.    
Include the full text of this exception, including this message, the stack trace, and all of the inner exception details.    

Include the full type definition of <>f__AnonymousType3`2[[Neo4jClient.Node`1[[IQS_ACL.Nodes.User, IQS ACL, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]], Neo4jClient, Version=1.0.0.594, Culture=neutral, PublicKeyToken=null],[Neo4jClient.Node`1[[IQS_ACL.Nodes.SecurityRelationshipObject, IQS ACL, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]], Neo4jClient, Version=1.0.0.594, Culture=neutral, PublicKeyToken=null]].

Include this raw JSON, with any sensitive values replaced with non-sensitive equivalents:    

{    
  "columns" : [ "Node", "Rels" ],    
  "data" : [ [ {    
    "paged_traverse" : "http://localhost:7474/db/data/node/7690/paged/traverse/{returnType}{?pageSize,leaseTime}",    
    "outgoing_relationships" : "http://localhost:7474/db/data/node/7690/relationships/out",    
    "data" : {    
      "Name" : "root"    
    },    
    "traverse" : "http://localhost:7474/db/data/node/7690/traverse/{returnType}",    
    "all_typed_relationships" : "http://localhost:7474/db/data/node/7690/relationships/all/{-list|&|types}",    
    "all_relationships" : "http://localhost:7474/db/data/node/7690/relationships/all",    
    "property" : "http://localhost:7474/db/data/node/7690/properties/{key}",    
    "self" : "http://localhost:7474/db/data/node/7690",    
    "properties" : "http://localhost:7474/db/data/node/7690/properties",    
    "outgoing_typed_relationships" : "http://localhost:7474/db/data/node/7690/relationships/out/{-list|&|types}",    
    "incoming_relationships" : "http://localhost:7474/db/data/node/7690/relationships/in",    
    "incoming_typed_relationships" : "http://localhost:7474/db/data/node/7690/relationships/in/{-list|&|types}",    
    "extensions" : {    
    },    
    "create_relationship" : "http://localhost:7474/db/data/node/7690/relationships"    
  }, {    
    "start" : "http://localhost:7474/db/data/node/7690",    
    "data" : {    
      "W" : 3,    
      "R" : 3,    
      "ReadablePermissions" : "+R+W",    
      "X" : 1    
    },    
    "property" : "http://localhost:7474/db/data/relationship/9351/properties/{key}",    
    "self" : "http://localhost:7474/db/data/relationship/9351",    
    "properties" : "http://localhost:7474/db/data/relationship/9351/properties",    
    "type" : "SECURITY",    
    "extensions" : {    
    },    
    "end" : "http://localhost:7474/db/data/node/7696"    
  } ], [ {    
    "paged_traverse" : "http://localhost:7474/db/data/node/7690/paged/traverse/{returnType}{?pageSize,leaseTime}",    
    "outgoing_relationships" : "http://localhost:7474/db/data/node/7690/relationships/out",    
    "data" : {    
      "Name" : "root"    
    },    
    "traverse" : "http://localhost:7474/db/data/node/7690/traverse/{returnType}",    
    "all_typed_relationships" : "http://localhost:7474/db/data/node/7690/relationships/all/{-list|&|types}",    
    "all_relationships" : "http://localhost:7474/db/data/node/7690/relationships/all",    
    "property" : "http://localhost:7474/db/data/node/7690/properties/{key}",    
    "self" : "http://localhost:7474/db/data/node/7690",    
    "properties" : "http://localhost:7474/db/data/node/7690/properties",    
    "outgoing_typed_relationships" : "http://localhost:7474/db/data/node/7690/relationships/out/{-list|&|types}",    
    "incoming_relationships" : "http://localhost:7474/db/data/node/7690/relationships/in",    
    "incoming_typed_relationships" : "http://localhost:7474/db/data/node/7690/relationships/in/{-list|&|types}",    
    "extensions" : {    
    },    
    "create_relationship" : "http://localhost:7474/db/data/node/7690/relationships"    
  }, {    
    "start" : "http://localhost:7474/db/data/node/7690",
    "data" : {
      "W" : 3,
      "R" : 3,
      "ReadablePermissions" : "+R+W",
      "X" : 1
    },
    "property" : "http://localhost:7474/db/data/relationship/9351/properties/{key}",
    "self" : "http://localhost:7474/db/data/relationship/9351",
    "properties" : "http://localhost:7474/db/data/relationship/9351/properties",
    "type" : "SECURITY",
    "extensions" : {
    },
    "end" : "http://localhost:7474/db/data/node/7696"
  } ] ]}
var groups = clientConnection.Cypher
                .Start(new { n = "node(" + folderID + ")" })
                .Match("n<-[r:SECURITY]-x, x<-[v:IS_MEMBER_OF_GROUP*]-b where b.Name = '"+userName+"'")
                .ReturnDistinct((x, r) => new
                {
                    Node = x.As<Node<User>>(),
                    Rels = r.As<Node<SecurityRelationshipObject>>()
                });

var results = groups.Results;
It throws on the .Results();
public class User
{
    //CMIS Object Properties
    public string ObjectId { get; set; }
    public string BaseTypeId { get; set; }
    public string ObjectTypeId { get; set; }
    public IList<string> SecondaryObjectTypeIds { get; set; }
    public string Name { get; set; }
    public string Description { get; set; }
    public string CreatedBy { get; set; }
    public string CreationDate { get; set; }
    public string LastModifiedBy { get; set; }
    public string LastModificationDate { get; set; }
    public string ChangeToken { get; set; }
}

public class UserGroup
{
    //CMIS Object Properties
    public string ObjectId { get; set; }
    public string BaseTypeId { get; set; }
    public string ObjectTypeId { get; set; }
    public IList<string> SecondaryObjectTypeIds { get; set; }
    public string Name { get; set; }
    public string Description { get; set; }
    public string CreatedBy { get; set; }
    public string CreationDate { get; set; }
    public string LastModifiedBy { get; set; }
    public string LastModificationDate { get; set; }
    public string ChangeToken { get; set; }
}

public class RelationshipObject
{
    //CMIS Object Properties
    public string ObjectId { get; set; }
    public string BaseTypeId { get; set; }
    public string ObjectTypeId { get; set; }
    public Array SecondaryObjectTypeIds { get; set; }
    public string Name { get; set; }
    public string Description { get; set; }
    public string CreatedBy { get; set; }
    public string CreationDate { get; set; }
    public string LastModifiedBy { get; set; }
    public string LastModificationDate { get; set; }
    public string ChangeToken { get; set; }

    //RelationshipObject Properties
    public string sourceId { get; set; }
    public string targetId { get; set; }
}

public class SecurityRelationshipObject : RelationshipObject
{
    //CMIS Object Properties
    public IList<string> SecondaryObjectTypeIds { get; set; }
    public string ReadablePermissions { get; set; }
    public int R { get; set; }
    public int W { get; set; }
    public int X { get; set; }
}
public class RelationshipUserGroupToFolder: Relationship<SecurityRelationshipObject>, IRelationshipAllowingSourceNode<UserGroup>, IRelationshipAllowingTargetNode<FolderObject>
{
    string RelationshipName;

    public RelationshipUserGroupToFolder(string RelationshipName, NodeReference targetNode, SecurityRelationshipObject relationshipTypeObject)
        : base(targetNode, relationshipTypeObject)
    {
        this.RelationshipName = RelationshipName;
    }

    public override string RelationshipTypeKey
    {
        get { return RelationshipName; }
    }
}

public class RelationshipUserGroupToUserGroup : Relationship<RelationshipObject>, IRelationshipAllowingSourceNode<UserGroup>, IRelationshipAllowingTargetNode<UserGroup>
{
    string RelationshipName;

    public RelationshipUserGroupToUserGroup(string RelationshipName, NodeReference targetNode, RelationshipObject relationshipTypeObject)
        : base(targetNode, relationshipTypeObject)
    {
        this.RelationshipName = RelationshipName;
    }

    public override string RelationshipTypeKey
    {
        get { return RelationshipName; }
    }
}
公共类用户
{
//CMIS对象属性
公共字符串ObjectId{get;set;}
公共字符串BaseTypeId{get;set;}
公共字符串ObjectTypeId{get;set;}
公共IList SecondaryObjectTypeId{get;set;}
公共字符串名称{get;set;}
公共字符串说明{get;set;}
通过{get;set;}创建的公共字符串
公共字符串CreationDate{get;set;}
公共字符串LastModifiedBy{get;set;}
公共字符串LastModificationDate{get;set;}
公共字符串ChangeToken{get;set;}
}
公共类用户组
{
//CMIS对象属性
公共字符串ObjectId{get;set;}
公共字符串BaseTypeId{get;set;}
公共字符串ObjectTypeId{get;set;}
公共IList SecondaryObjectTypeId{get;set;}
公共字符串名称{get;set;}
公共字符串说明{get;set;}
通过{get;set;}创建的公共字符串
公共字符串CreationDate{get;set;}
公共字符串LastModifiedBy{get;set;}
公共字符串LastModificationDate{get;set;}
公共字符串ChangeToken{get;set;}
}
公共类RelationshipObject
{
//CMIS对象属性
公共字符串ObjectId{get;set;}
公共字符串BaseTypeId{get;set;}
公共字符串ObjectTypeId{get;set;}
公共数组SecondaryObjectTypeId{get;set;}
公共字符串名称{get;set;}
公共字符串说明{get;set;}
通过{get;set;}创建的公共字符串
公共字符串CreationDate{get;set;}
公共字符串LastModifiedBy{get;set;}
公共字符串LastModificationDate{get;set;}
公共字符串ChangeToken{get;set;}
//关系对象属性
公共字符串sourceId{get;set;}
公共字符串targetId{get;set;}
}
公共类SecurityRelationshipObject:RelationshipObject
{
//CMIS对象属性
公共IList SecondaryObjectTypeId{get;set;}
公共字符串可读权限{get;set;}
公共int R{get;set;}
公共整数W{get;set;}
公共整数X{get;set;}
}
关系定义:

Neo4jClient encountered an exception while deserializing the response from the server. This is likely a bug in Neo4jClient.    
Please open an issue at https://bitbucket.org/Readify/neo4jclient/issues/new    
To get a reply, and track your issue, ensure you are logged in on BitBucket before submitting.    
Include the full text of this exception, including this message, the stack trace, and all of the inner exception details.    

Include the full type definition of <>f__AnonymousType3`2[[Neo4jClient.Node`1[[IQS_ACL.Nodes.User, IQS ACL, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]], Neo4jClient, Version=1.0.0.594, Culture=neutral, PublicKeyToken=null],[Neo4jClient.Node`1[[IQS_ACL.Nodes.SecurityRelationshipObject, IQS ACL, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]], Neo4jClient, Version=1.0.0.594, Culture=neutral, PublicKeyToken=null]].

Include this raw JSON, with any sensitive values replaced with non-sensitive equivalents:    

{    
  "columns" : [ "Node", "Rels" ],    
  "data" : [ [ {    
    "paged_traverse" : "http://localhost:7474/db/data/node/7690/paged/traverse/{returnType}{?pageSize,leaseTime}",    
    "outgoing_relationships" : "http://localhost:7474/db/data/node/7690/relationships/out",    
    "data" : {    
      "Name" : "root"    
    },    
    "traverse" : "http://localhost:7474/db/data/node/7690/traverse/{returnType}",    
    "all_typed_relationships" : "http://localhost:7474/db/data/node/7690/relationships/all/{-list|&|types}",    
    "all_relationships" : "http://localhost:7474/db/data/node/7690/relationships/all",    
    "property" : "http://localhost:7474/db/data/node/7690/properties/{key}",    
    "self" : "http://localhost:7474/db/data/node/7690",    
    "properties" : "http://localhost:7474/db/data/node/7690/properties",    
    "outgoing_typed_relationships" : "http://localhost:7474/db/data/node/7690/relationships/out/{-list|&|types}",    
    "incoming_relationships" : "http://localhost:7474/db/data/node/7690/relationships/in",    
    "incoming_typed_relationships" : "http://localhost:7474/db/data/node/7690/relationships/in/{-list|&|types}",    
    "extensions" : {    
    },    
    "create_relationship" : "http://localhost:7474/db/data/node/7690/relationships"    
  }, {    
    "start" : "http://localhost:7474/db/data/node/7690",    
    "data" : {    
      "W" : 3,    
      "R" : 3,    
      "ReadablePermissions" : "+R+W",    
      "X" : 1    
    },    
    "property" : "http://localhost:7474/db/data/relationship/9351/properties/{key}",    
    "self" : "http://localhost:7474/db/data/relationship/9351",    
    "properties" : "http://localhost:7474/db/data/relationship/9351/properties",    
    "type" : "SECURITY",    
    "extensions" : {    
    },    
    "end" : "http://localhost:7474/db/data/node/7696"    
  } ], [ {    
    "paged_traverse" : "http://localhost:7474/db/data/node/7690/paged/traverse/{returnType}{?pageSize,leaseTime}",    
    "outgoing_relationships" : "http://localhost:7474/db/data/node/7690/relationships/out",    
    "data" : {    
      "Name" : "root"    
    },    
    "traverse" : "http://localhost:7474/db/data/node/7690/traverse/{returnType}",    
    "all_typed_relationships" : "http://localhost:7474/db/data/node/7690/relationships/all/{-list|&|types}",    
    "all_relationships" : "http://localhost:7474/db/data/node/7690/relationships/all",    
    "property" : "http://localhost:7474/db/data/node/7690/properties/{key}",    
    "self" : "http://localhost:7474/db/data/node/7690",    
    "properties" : "http://localhost:7474/db/data/node/7690/properties",    
    "outgoing_typed_relationships" : "http://localhost:7474/db/data/node/7690/relationships/out/{-list|&|types}",    
    "incoming_relationships" : "http://localhost:7474/db/data/node/7690/relationships/in",    
    "incoming_typed_relationships" : "http://localhost:7474/db/data/node/7690/relationships/in/{-list|&|types}",    
    "extensions" : {    
    },    
    "create_relationship" : "http://localhost:7474/db/data/node/7690/relationships"    
  }, {    
    "start" : "http://localhost:7474/db/data/node/7690",
    "data" : {
      "W" : 3,
      "R" : 3,
      "ReadablePermissions" : "+R+W",
      "X" : 1
    },
    "property" : "http://localhost:7474/db/data/relationship/9351/properties/{key}",
    "self" : "http://localhost:7474/db/data/relationship/9351",
    "properties" : "http://localhost:7474/db/data/relationship/9351/properties",
    "type" : "SECURITY",
    "extensions" : {
    },
    "end" : "http://localhost:7474/db/data/node/7696"
  } ] ]}
var groups = clientConnection.Cypher
                .Start(new { n = "node(" + folderID + ")" })
                .Match("n<-[r:SECURITY]-x, x<-[v:IS_MEMBER_OF_GROUP*]-b where b.Name = '"+userName+"'")
                .ReturnDistinct((x, r) => new
                {
                    Node = x.As<Node<User>>(),
                    Rels = r.As<Node<SecurityRelationshipObject>>()
                });

var results = groups.Results;
It throws on the .Results();
public class User
{
    //CMIS Object Properties
    public string ObjectId { get; set; }
    public string BaseTypeId { get; set; }
    public string ObjectTypeId { get; set; }
    public IList<string> SecondaryObjectTypeIds { get; set; }
    public string Name { get; set; }
    public string Description { get; set; }
    public string CreatedBy { get; set; }
    public string CreationDate { get; set; }
    public string LastModifiedBy { get; set; }
    public string LastModificationDate { get; set; }
    public string ChangeToken { get; set; }
}

public class UserGroup
{
    //CMIS Object Properties
    public string ObjectId { get; set; }
    public string BaseTypeId { get; set; }
    public string ObjectTypeId { get; set; }
    public IList<string> SecondaryObjectTypeIds { get; set; }
    public string Name { get; set; }
    public string Description { get; set; }
    public string CreatedBy { get; set; }
    public string CreationDate { get; set; }
    public string LastModifiedBy { get; set; }
    public string LastModificationDate { get; set; }
    public string ChangeToken { get; set; }
}

public class RelationshipObject
{
    //CMIS Object Properties
    public string ObjectId { get; set; }
    public string BaseTypeId { get; set; }
    public string ObjectTypeId { get; set; }
    public Array SecondaryObjectTypeIds { get; set; }
    public string Name { get; set; }
    public string Description { get; set; }
    public string CreatedBy { get; set; }
    public string CreationDate { get; set; }
    public string LastModifiedBy { get; set; }
    public string LastModificationDate { get; set; }
    public string ChangeToken { get; set; }

    //RelationshipObject Properties
    public string sourceId { get; set; }
    public string targetId { get; set; }
}

public class SecurityRelationshipObject : RelationshipObject
{
    //CMIS Object Properties
    public IList<string> SecondaryObjectTypeIds { get; set; }
    public string ReadablePermissions { get; set; }
    public int R { get; set; }
    public int W { get; set; }
    public int X { get; set; }
}
public class RelationshipUserGroupToFolder: Relationship<SecurityRelationshipObject>, IRelationshipAllowingSourceNode<UserGroup>, IRelationshipAllowingTargetNode<FolderObject>
{
    string RelationshipName;

    public RelationshipUserGroupToFolder(string RelationshipName, NodeReference targetNode, SecurityRelationshipObject relationshipTypeObject)
        : base(targetNode, relationshipTypeObject)
    {
        this.RelationshipName = RelationshipName;
    }

    public override string RelationshipTypeKey
    {
        get { return RelationshipName; }
    }
}

public class RelationshipUserGroupToUserGroup : Relationship<RelationshipObject>, IRelationshipAllowingSourceNode<UserGroup>, IRelationshipAllowingTargetNode<UserGroup>
{
    string RelationshipName;

    public RelationshipUserGroupToUserGroup(string RelationshipName, NodeReference targetNode, RelationshipObject relationshipTypeObject)
        : base(targetNode, relationshipTypeObject)
    {
        this.RelationshipName = RelationshipName;
    }

    public override string RelationshipTypeKey
    {
        get { return RelationshipName; }
    }
}
公共类RelationshipUserGroupToFolder:关系、IRRelationshipAllowingSourceNode、IRRelationshipAllowingTargetNode
{
字符串关系名称;
public RelationshipUserGroupToFolder(string RelationshipName、NodeReference targetNode、SecurityRelationshipObject relationshipTypeObject)
:base(targetNode,relationshipTypeObject)
{
this.RelationshipName=RelationshipName;
}
公共重写字符串RelationshipTypeKey
{
获取{return RelationshipName;}
}
}
公共类RelationshipUserGroupToUserGroup:RelationshipRelationshipAllowingSourceNode、IRelationshipAllowingTargetNode
{
字符串关系名称;
public RelationshipUserGroupToUserGroup(字符串RelationshipName、NodeReference targetNode、RelationshipObject relationshipTypeObject)
:base(targetNode,relationshipTypeObject)
{
this.RelationshipName=RelationshipName;
}
公共重写字符串RelationshipTypeKey
{
获取{return RelationshipName;}
}
}

有一些不同的类型,如RelationshipUserToFolder(安全性)或RelationshipUserToUserGroup(是\u组的成员)

我很确定问题是由于
Rels=…
代码位造成的,我很确定您正试图将
关系
转换为
节点
,而Neo4j不知道如何做到这一点。另外,JSON.NET(通过关联,neo4jclient)不知道如何反序列化
SecurityRelationshipObject
,因为它(及其基类)有一个定义为
Array
IList
类型的属性,只能反序列化
IEnumerable
集合

为此,
.ReturnDistinct
应如下所示:

/* Rest of query here */
.ReturnDistinct((x, r) => new
{
    Node = x.As<Node<User>>(),
    Rels = r.As<RelationshipInstance<SecurityRelationshipObject>>()
});

我很确定问题是由于
Rels=…
位代码造成的,因为我很确定您正试图将
关系
强制转换到
节点
中,而Neo4j不知道如何做。另外,JSON.NET(通过关联,neo4jclient)不知道如何反序列化
SecurityRelationshipObject
,因为它(及其基类)有一个定义为
Array
IList
类型的属性,只能反序列化
IEnumerable
集合

为此,
.ReturnDistinct
应如下所示:

/* Rest of query here */
.ReturnDistinct((x, r) => new
{
    Node = x.As<Node<User>>(),
    Rels = r.As<RelationshipInstance<SecurityRelationshipObject>>()
});

您能否提供
User
SecurityRelationshipObject
的类定义,谢谢!嗨,我把它加到问题上了。谢谢。很好,
RelationshipObject
(SecurityRelationshipObject的基类)是关系吗?是的,事实上它看起来几乎和SecurityRelationshipObject完全一样(注释掉的部分至少是其中的内容)。我会在quick中编辑它。好的,这可能需要更多信息:1。如何定义
安全性
关系,2。如何定义组的
IsMemberOfGroup
关系。。。作为旁注-您是否尝试将
Rels=r.As()
更改为
Rels=r.As()
您能否提供
User
SecurityRelationshipObject
的类定义,谢谢!嗨,我把它加到问题上了。谢谢。很好,
RelationshipObject
(SecurityRelationshipObject的基类)是关系吗?是的,事实上它看起来几乎和SecurityRelationshipObject完全一样(注释掉的部分至少是其中的内容)。我会在quick中编辑它。好的,这可能需要更多信息:1。如何定义
安全性
关系,2。
IsMemberOfGroup
关系如何