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.
Laravel 8.19.0 PHP 7.4.2 MySQL 5.7.26
I get an error when using a where subquery:
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 https://github.com/jarektkaczyk/eloquence-base/issues/31.