My question is the following. I have the following node relationship:
(Student)-[:StudiesIn]->(Class)<-[:Teaches]-(Professor)
I'm trying to display on the graph generator in the browser a query like:
MATCH st=(a:Student)-[]-()-[]-(sir:Professor) RETURN st
Which gives me back a relationship including the class. Now I don't really care about the class for this particular visualization, and I would want to hide it. Is there any way of doing this without ACTUALLY creating (And storing on the disk) the relationship between the student and the professor?
I'd just want something like:
MATCH (a:Student)-[]-()-[]-(sir:Professor) RETURN (a)-[{name:"HasAsProfessor"}]-(sir)
But that doesn't work. I've also looked at :http://grokbase.com/t/gg/neo4j/147evnv9j2/feature-request-virtual-relationships-in-result-sets where the suggestion looks like:
MATCH (a:Student)-[]-()-[]-(sir:Professor) RETURN {start:a, rel:"CustomRel", end:sir}
But that didn't work in the browser (And I don't have time to re-implement a graph visualization tool from scratch)
Thank you for your help.