diff --git a/src/Compiler/Dialects/Common/Listeners/PropagateBoundParameters.php b/src/Compiler/Dialects/Common/Listeners/PropagateBoundParameters.php index b076fbd..abc4436 100644 --- a/src/Compiler/Dialects/Common/Listeners/PropagateBoundParameters.php +++ b/src/Compiler/Dialects/Common/Listeners/PropagateBoundParameters.php @@ -16,7 +16,7 @@ public function __invoke(PostSelectQueryCompile $event): void foreach ($event->query->getBinder()->bindings() as $binding) { $placeholder = ':' . $binding->placeholder; - if (preg_match('/' . $placeholder . '(?:\W|$)/', $event->sql) > 0) { + if (preg_match('/' . $placeholder . '(?:\W|$)/', $event->getRevisedSql()) > 0) { $event->binder->bind($placeholder, $binding->value, $binding->type); } }