Vinelab / NeoEloquent

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

Fix nested parameter groupings in where clause #324

Closed adiachenko closed 5 years ago

adiachenko commented 5 years ago

Nested parameter groupings result in Undefined index: column errors. Below is a simplified example of parameter grouping:

$query->where(function ($query) {
    $query->where('votes', '>', 100)
        ->orWhere('title', '=', 'Admin');
})

The main culprit is Vinelab\NeoEloquent\Eloquent::prefixWheres that doesn't support where clauses of type "Nested". This PR is meant to address the issue.