When I retrieve the relation Follows on a user that is on both sides of a relation, e.g. B in A -follows-> B -follows-> C, the relation data contains wrong records, which seems as if the relation direction is not taken into account. Though I have not figured out the cause of the issue yet.
For the example in the image, the relation count for all users should be 1, in some cases its 2 though.
I have created a test case which I will send a PR. Test output:
There was 1 failure:
1) GraphAware\Neo4j\OGM\Tests\Integration\RelationshipEntityBetweenSameModelTest::testUserWithReCanBeRetrievedChain
followee0 should follow exactly one user, but the relation contains:
me --follows--> followee0
followee0 --follows--> followee1
Failed asserting that 2 matches expected 1.
Example:
Classes like they are defined in the tests:
https://github.com/graphaware/neo4j-php-ogm/blob/0d7bc53b4570f2c45798f117d923ab9940209bfc/tests/Integration/RelationshipEntityBetweenSameModelTest.php#L92-L243
Data in the database looks like this:
When I retrieve the relation
Follows
on a user that is on both sides of a relation, e.g. B in A -follows-> B -follows-> C, the relation data contains wrong records, which seems as if the relation direction is not taken into account. Though I have not figured out the cause of the issue yet.For the example in the image, the relation count for all users should be 1, in some cases its 2 though.
I have created a test case which I will send a PR. Test output: