Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
08-22-2020 02:49 AM
This is my current graph model.
How do I represent that a leader may start leading a group, leave and come back to lead the same group multiple times?
Eg. Rambo may lead the expendables from 2015-2016, and then may also come back to lead them again in 2017-18.
Solved! Go to Solution.
08-23-2020 12:22 AM
Hi John, Yes we can:
CREATE (L:Leader{Name:"John Doe"})-[:LEADS{startDate:"2020-08-20", terminationDate:"2020-08-20"}]->(G:Group{Title:"Alpha"}) return L,G
match (L:Leader{Name:"John Doe"}),(G:Group{Title:"Alpha"})
create (L)-[:LEADS{startDate:"2019-08-20", terminationDate:"2019-08-20"}]->(G)
return L,G
But...
If you need to query event create a node (:EVENT) with start date and enddate can be useful.
Alessio
08-22-2020 03:24 AM
08-23-2020 12:22 AM
Hi John, Yes we can:
CREATE (L:Leader{Name:"John Doe"})-[:LEADS{startDate:"2020-08-20", terminationDate:"2020-08-20"}]->(G:Group{Title:"Alpha"}) return L,G
match (L:Leader{Name:"John Doe"}),(G:Group{Title:"Alpha"})
create (L)-[:LEADS{startDate:"2019-08-20", terminationDate:"2019-08-20"}]->(G)
return L,G
But...
If you need to query event create a node (:EVENT) with start date and enddate can be useful.
Alessio
All the sessions of the conference are now available online