diff --git a/src/Dibi/Fluent.php b/src/Dibi/Fluent.php index d4ee9398..2cc68e49 100644 --- a/src/Dibi/Fluent.php +++ b/src/Dibi/Fluent.php @@ -189,6 +189,7 @@ class Fluent implements IDataSource foreach ($args as $arg) { if ($arg instanceof self) { + $this->cursor[] = '%SQL'; $arg = "($arg)"; } $this->cursor[] = $arg; diff --git a/tests/dibi/Fluent.select.phpt b/tests/dibi/Fluent.select.phpt index 19b5aa85..a9257362 100644 --- a/tests/dibi/Fluent.select.phpt +++ b/tests/dibi/Fluent.select.phpt @@ -1,5 +1,9 @@