diff --git a/src/Db/AbstractDb.php b/src/Db/AbstractDb.php index 3624f1efd..4214910be 100644 --- a/src/Db/AbstractDb.php +++ b/src/Db/AbstractDb.php @@ -189,6 +189,7 @@ public function getExclude() public function setExclude($exclude) { $this->exclude = $exclude; + $this->select = null; return $this; } @@ -210,7 +211,8 @@ public function getField() */ public function setField($field) { - $this->field = (string) $field; + $this->field = (string) $field; + $this->select = null; return $this; } @@ -232,7 +234,8 @@ public function getTable() */ public function setTable($table) { - $this->table = (string) $table; + $this->table = (string) $table; + $this->select = null; return $this; } @@ -255,6 +258,7 @@ public function getSchema() public function setSchema($schema) { $this->schema = $schema; + $this->select = null; return $this; } @@ -280,8 +284,7 @@ public function setSelect(Select $select) */ public function getSelect() { - if ($this->select instanceof Select - && ($this->getSchema() === null || $this->getTable() === '' || $this->getField() === '' || $this->getExclude() === null)) { + if ($this->select instanceof Select) { return $this->select; }