Vinelab / NeoEloquent

The Neo4j OGM for Laravel
MIT License
633 stars 199 forks source link

Why are edges not filtered by direction on `HasOneOrMany` #189

Closed apopiak closed 4 years ago

apopiak commented 7 years ago

I am perpetually calling

$hasmany->edges()->filter(function ($edge) { return $edge is EdgeOut; })

because the edges() function in HasOneOrMany does not filter by direction. Is a fix planned or is this inteded behaviour? (see [here]https://github.com/Vinelab/NeoEloquent/blob/1.4/src/Vinelab/NeoEloquent/Eloquent/Relations/HasOneOrMany.php#L122) )

PS: same of course holds true for EdgeIn in BelongsTo.

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.