pdpotter opened a new issue #119:
URL: https://github.com/apache/incubator-age/issues/119
When an edge is created following the documentation, the edge is created in
opposite direction. Steps to reproduce:
Create two vertices
```
select * from cypher('test_graph', $$CREATE (a:Person {id:1}) return a$$) as
(a agtype);
a
------------------------------------------------------------------------------
{"id": 1125899906842625, "label": "Person", "properties": {"id": 1}}::vertex
(1 row)
```
```
select * from cypher('test_graph', $$CREATE (b:Person {id:2}) return b$$) as
(b agtype);
b
------------------------------------------------------------------------------
{"id": 1125899906842626, "label": "Person", "properties": {"id": 2}}::vertex
(1 row)
```
Create an edge between the vertices. If the edge is returned, it is already
clear the edge has the opposite direction.
```
select * from cypher('test_graph', $$MATCH (a:Person {id:1}), (b:Person
{id:2}) CREATE (a)-[e:knows]->(b) return e$$) as (e agtype);
e
------------------------------------------------------------------------------------------------------------------------------
{"id": 1407374883553287, "label": "knows", "end_id": 1125899906842625,
"start_id": 1125899906842626, "properties": {}}::edge
(1 row)
```
When querying the graph for the edge in the wanted direction, no results are
returned.
```
select * from cypher('test_graph', $$MATCH (a:Person {id:1})-[e]->(b:Person
{id:2}) return e$$) as (e agtype);
e
---
(0 rows)
```
When querying the graph for the edge in the opposite direction, the edge is
returned as a result.
```
select * from cypher('test_graph', $$MATCH (a:Person {id:2})-[e]->(b:Person
{id:1}) return e$$) as (e agtype);
e
------------------------------------------------------------------------------------------------------------------------------
{"id": 1407374883553287, "label": "knows", "end_id": 1125899906842625,
"start_id": 1125899906842626, "properties": {}}::edge
(1 row)
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]