Dear All:
I want to implement something like the following:
create (London:City {name:"London"})
create (n:Person {name:"Nana"}) - [r:meet {date:"2021-02-05", city: London}] -> (m:Person {name:"John"}) , but this doesn't work.
it show error "Property values can only be of primitive types or arrays thereof".
I can only use city:"London" .But my intention is to refer directly to node: London instead of string "London".
I think maybe I'll have to build another event Node, like:
create (event:Event {name: "meetEvent",date:"2021-02-05"})
create (n: Person {name:"Nana"}) - [r: hasEvent] -> (event)
create (event) - [r: takePlaceIn] -> (London)
Is there a better way to do it?
Thanks a lot !
I think maybe Neo4j doesn't support variable or node types relationship property, I don't know if this is the case, then my idea may not be realized
That is correct, you cannot directly reference a node as a node or relationship property.
An :Event node makes sense.
I see. Thank you, Andrew