Implements the magic __wakeup function to reconnect to the database.
public function __wakeup() { $this->connection = Database::getConnection($this->connectionTarget, $this->connectionKey); }