You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently it is not possible to generate related entities when there is an obvious simple result similar to: MATCH (p1:Person)-[r]-(p2:Person) return p1, r, p2
The results for the relationship and related node needs to get wrapped into a list like this: MATCH (p1:Person)-[r]-(p2:Person) return p1, collect(r), collect(p2)
Would be good to have the option to dismiss the need of collect for 1:1 relationships.
The text was updated successfully, but these errors were encountered:
This will only be possible for one-to-one relationships. A node that has several relations of the same type to other nodes will cause to return more than one record / row. So given
MATCH (p1:Person)-[r:KNOWS]-(p2:Person) return p1, collect(r), collect(p2)
This aggregates all people that p1 knows into dedicated collections and makes that subgraph a single record to be returned.
MATCH (p1:Person)-[r:KNOWS]-(p2:Person) return p1, r, p2
however will be as many records / rows as there different relationships between people and we would not be able to map it.
I'm however all in on simplifying that for the 1-to-1 use case.
Currently it is not possible to generate related entities when there is an obvious simple result similar to:
MATCH (p1:Person)-[r]-(p2:Person) return p1, r, p2
The results for the relationship and related node needs to get wrapped into a list like this:
MATCH (p1:Person)-[r]-(p2:Person) return p1, collect(r), collect(p2)
Would be good to have the option to dismiss the need of
collect
for 1:1 relationships.The text was updated successfully, but these errors were encountered: