You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
An extra binding is inserted into a query of a model that references a morphMany relationship in it's $withCount property when using a nested where() statement.
Steps To Reproduce:
class ParentModel extends Model
{
protected$table = 'parent';
protected$withCount = ['children'];
publicfunctionchildren()
{
return$this->morphMany(ChildModel::class, 'morphable');
}
}
class ChildModel extends Model
{
protected$table = 'child';
}
$parent = newParentModel;
$query = $parent->newQuery()->where(function($q) {
return$q->where(1,1);
});
$bindings = $query->getBindings();
Description:
An extra binding is inserted into a query of a model that references a
morphMany
relationship in it's$withCount
property when using a nestedwhere()
statement.Steps To Reproduce:
Expected bindings:
Expected query:
Actual Bindings
Actual query:
The text was updated successfully, but these errors were encountered: