cypher - Nested Maps and Collections in Neo4j 2 -
i understand node , relationship properties limited primitive types or arrays of primitive types. "maps" section of neo4j 2.1 reference card mentions that:
{name:'alice', age:38, address:{city:'london', residential:true}}
literal maps declared in curly braces property maps. nested maps , collections supported.
of course like:
create (alice {name:'alice', age:38, address:{city:'london', residential:true}}) throws exception:
error: property values can of primitive types or arrays thereof neo.clienterror.statement.invalidtype in context neo4j support nested maps , collections?
(edited)
the reference card bit subtle. important word "literal". in other words, can use arbitrarily nested maps , arrays in literals, cannot store such things in node or relationship.
for example, works:
with {name:'alice', age:38, address:[{city:'london', residential:true}, {city: 'paris', residential: false} ]} x return x; but fails:
create (x {name:'alice', age:38, address:[{city:'london', residential:true}, {city: 'paris', residential: false} ]}) return x;
Comments
Post a Comment