I have a graph that has nodes for each kind of location. I want to create a relationship whenever a person visits a location. The relationship would look something like this.
All the location nodes are already present in the graph. The person node would have a unique id and I would have a few properties on the Visits node too.The thing I want to do is if the graph has never seen this person create a new node for this person and the required relationships , if the graph has already seen this Person earlier I just need to create one more relationship between the Person and the Location node through a visits node.
I know i am supposed to use merge here but the thing is it creates a new person node everytime even if the person node for that id is already present in the graph.