Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
05-05-2021 01:52 AM
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 !
05-06-2021 08:06 AM
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
05-07-2021 07:25 AM
That is correct, you cannot directly reference a node as a node or relationship property.
An :Event node makes sense.
05-07-2021 05:57 PM
I see. Thank you, Andrew
All the sessions of the conference are now available online