Hi,
Starting with virtual relationships and have a simple cypher statement
MATCH (a:company)<-[:Assigned_to]-(r:patent)-[:Classified_as]->(b:cpc) RETURN a,b, apoc.create.vRelationship(a,'Uses',{howmany:count(r)},b)
This seems to return the correct result when viewed in table format in browser.
{
"identity": 1,
"labels": [
"company"
],
"properties": {
"name": "Advanced Microgrid Solutions",
"description": "Advanced Microgrid Solutions installs advanced energy storage systems in buildings to lower energy costs for consumers and provide clean.",
"URL": "https://www.crunchbase.com/organization/advanced-microgrid-solutions"
}
}
{
"identity": 227674,
"labels": [
"cpc"
],
"properties": {
"cpclevel": 8,
"art": "Load forecast, e.g. methods or systems for forecasting future load demand",
"subgroup": "H02J3/003"
}
}
{
"identity": -26011,
"start": 1,
"end": 227674,
"type": "Uses",
"properties": {
"howmany": 2
}
}
However in graph mode display the relationships are not shown. Yellow nodes are 'a' and green are 'b' nodes. The virtual relationship is not shown. Is this intended behavior or must I define it somehow to display it?
If I change the query slightly to include a specific company (name:'Sonnen')
MATCH (a:company{name:'Sonnen'})<-[:Assigned_to]-(r:patent)-[:Classified_as]->(b:cpc)
RETURN a,b, apoc.create.vRelationship(a,'Uses',{howmany:count(r)},b)
Then the returned graph does display the virtual relationships:
So I do I get this result for all the companies as defined in the first query?
Andy