Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Call to undefined method Sofa\Eloquence\Query\Builder::orWhereHas() #40

Open
marnickmenting opened this issue Feb 5, 2021 · 0 comments

Comments

@marnickmenting
Copy link

marnickmenting commented Feb 5, 2021

Laravel 8.19.0
PHP 7.4.2
MySQL 5.7.26

I get an error when using a where subquery:

Ticket::where(function($query) {
            $query->whereHas('timeRegistrations', function ($query) {
                $query->whereNull('invoice_id');
            })->orWhereHas('usedProducts', function ($query) {
                $query->whereNull('invoice_id');
           });
})->get();

Results in Call to undefined method Sofa\Eloquence\Query\Builder::orWhereHas()

Without the subquery, the orWhereHas method works. Seems it is using the wrong Builder class within the subfunction, but I don't know where to start to investigate this.

Possibly related to #31.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant