diff --git a/src/Oci8/Oci8Connection.php b/src/Oci8/Oci8Connection.php index 1bc7a662..1f9cd32d 100644 --- a/src/Oci8/Oci8Connection.php +++ b/src/Oci8/Oci8Connection.php @@ -329,7 +329,9 @@ public function createStatementFromFunction($functionName, array $bindings) */ protected function getDefaultQueryGrammar() { - return $this->withTablePrefix(new QueryGrammar()); + ($grammar = new QueryGrammar)->setConnection($this); + + return $this->withTablePrefix($grammar); } /** @@ -384,7 +386,9 @@ protected function getConfigMaxLength() */ protected function getDefaultSchemaGrammar() { - return $this->withTablePrefix(new SchemaGrammar()); + ($grammar = new SchemaGrammar)->setConnection($this); + + return $this->withTablePrefix($grammar); } /**