Neos\Flow\Persistence\Doctrine\Query::__wakeup PHP Method

__wakeup() public method

Recreate query builder and set state again.
public __wakeup ( ) : void
return void
    public function __wakeup()
    {
        if ($this->constraint !== null) {
            $this->queryBuilder->where($this->constraint);
        }
        if (is_array($this->orderings)) {
            $aliases = $this->queryBuilder->getRootAliases();
            foreach ($this->orderings as $propertyName => $order) {
                $this->queryBuilder->addOrderBy($aliases[0] . '.' . $propertyName, $order);
            }
        }
        if (is_array($this->joins)) {
            foreach ($this->joins as $joinAlias => $join) {
                $this->queryBuilder->leftJoin($join, $joinAlias);
            }
        }
        $this->queryBuilder->setFirstResult($this->offset);
        $this->queryBuilder->setMaxResults($this->limit);
        $this->queryBuilder->distinct($this->distinct);
        $this->queryBuilder->setParameters($this->parameters);
        unset($this->parameters);
    }