Hello
I have the following nodes:
- Catalog{id, name}
- User{id, email}
I want to:
- create Catalog node if there is no such one
- add relationship [CREATED_BY{createdOn:datetime()}]
MERGE (c:Collection{name:"Holiday meals"})
WITH c
MATCH (u:User{email:"test@gmai.com"})
MERGE (u)-[rel:COLLECTION_CREATED{createdOn:datetime()}]->(c)
RETURN c
Unfortunately there is no uniqueness because of createdOn property in the relationship and every time there is a new relation created between the nodes.
What can I do to fix this?
Any suggestions about changes in architecture or current implementations will be welcomed
Thanks