cancel
Showing results for 
Search instead for 
Did you mean: 

Two nodes but are actually the same

AhmadKhidir
Node Link

Hi Neo4j,

I am currently undergone a project to create a relationship graph on customers. The graph scheme has been completed and tested, but I am currently having an issue with one particular situation.image.pngAs per the graph schema above, I want to point every customer to their respective employer. An issue I am facing is, there are times when the employer is also my customer. In that case, I would end up having two nodes (red and purple) that are essentially the same. Ideally, I want my individual customers who work at the the employer (my customer also) to be connected by the WORK_AT relationship.

The only idea I can think of to tackle this issue is to adjust the data source (having join ID). However, if the community has any idea how to tackle this, you guys are more than welcome.

Thank you

 

2 REPLIES 2

glilienfield
Ninja
Ninja

I guess you could take one of these approaches;

1. Label these nodes with both Customer and Employer labels and have a self reference of type WORK_AT. You would need the union of the properties for Customer and Employer. 
2. Pick a person that works at the employer that is a client and use that person as the customer. 

No 1 works.

But I found another way that I think suits my situation best. I make so the Address node is one, in which could be Office/Home address. That is how I connected customer who work at business entity, who is also a customer.

AhmadKhidir_0-1655371418983.png 

Thank you @glilienfield