From 50acdad96b628ac7d57a8ec41e0c60d57064fa08 Mon Sep 17 00:00:00 2001 From: Aleksei Zarubin Date: Thu, 23 Dec 2021 15:18:25 +0500 Subject: [PATCH] fix: qualifying pivot table column for whereDate filter --- src/Drivers/Standard/QueryBuilder.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Drivers/Standard/QueryBuilder.php b/src/Drivers/Standard/QueryBuilder.php index e8440827..f52096b5 100644 --- a/src/Drivers/Standard/QueryBuilder.php +++ b/src/Drivers/Standard/QueryBuilder.php @@ -257,7 +257,7 @@ protected function buildPivotFilterNestedQueryWhereClause( if ($treatAsDateField && Carbon::parse($filterDescriptor['value'])->toTimeString() === '00:00:00') { $query->addNestedWhereQuery( $query->newPivotStatement()->whereDate( - $query->qualifyPivotColumn($field), + $query->getTable().".{$field}", $filterDescriptor['operator'], $filterDescriptor['value'] )