Skip to content

Bug: error when create array property on relationship using apoc.create.relationship  #210

@johnymontana

Description

@johnymontana
CREATE (a)
CREATE (b)
WITH a,b
CALL apoc.create.relationship(a, "RELATED_TO", {roles: ["Kevin Lomax"]}, b) YIELD rel AS r
RETURN *

results in

Failed to invoke procedure `apoc.create.relationship`: Caused by: java.lang.IllegalArgumentException: [[Kevin Lomax]:scala.collection.convert.Wrappers$SeqWrapper] is not a supported property value

Similarly, if loading from JSON using apoc.load.json, trying to create a relationship with an array property using

CALL apoc.load.json("https://dl.dropboxusercontent.com/u/67572426/movie_graph.json") YIELD value AS row
WITH row, row.graph.nodes AS nodes
UNWIND nodes AS node
CALL apoc.create.node(node.labels, node.properties) YIELD node AS n
SET n.id = node.id
WITH row
UNWIND row.graph.relationships AS rel
MATCH (a) WHERE a.id = rel.startNode
MATCH (b) WHERE b.id = rel.endNode
CALL apoc.create.relationship(a, rel.type, rel.properties, b) YIELD rel AS r
RETURN *

results in

Failed to invoke procedure `apoc.create.relationship`: Caused by: java.lang.IllegalArgumentException: [[Kevin Lomax]:java.util.ArrayList] is not a supported property value

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions