public function Query::__wakeup

Implements the magic __wakeup function to reconnect to the database.

File

drupal/core/lib/Drupal/Core/Database/Query/Query.php, line 96
Definition of Drupal\Core\Database\Query\Query

Class

Query
Base class for query builders.

Namespace

Drupal\Core\Database\Query

Code

public function __wakeup() {
  $this->connection = Database::getConnection($this->connectionTarget, $this->connectionKey);
}