Lets assume the following entities:
A 'user' has a 'blog' and the blog has 'entries'. A blog can have multiple users and an entry has three properties, user, blog and a string entry. I want to write a cypher query that returns all the entries for a particular blog and user. I have both the user node id and the blog id. I can use the user id to start the node but how can the blog id be used? I don't have access to anything else which is unique, hence the node id is being used.
start user=(1) match (user)->[:BLOG]-(blog)->[:ENTRY](entry) where entry.blog = blogId return entry
Recommendations would be appreciated.
At first your cypher query looks wrong, maybe other version than stable?
If you have user id and blog id I think it you can try this out:
I think, in graph database using foreign key is unnecessary.