src/Session/SaveHandler/DoctrineDbal.php
public function write($id, $data)
    {
        $data = array(
            $this->getOptions()->getModifiedColumn() => time(),
            $this->getOptions()->getDataColumn()     => (string) $data,
        );

        if ($this->find($id)) {
            return $this->getConnection()->update(
                $this->getOptions()->getTableName(),
                $data,
                array(
                    $this->getOptions()->getIdColumn()   => $id,
                    $this->getOptions()->getNameColumn() => $this->sessionName,
                )
            );

        }

        $data[$this->getOptions()->getLifetimeColumn()] = $this->lifetime;
        $data[$this->getOptions()->getIdColumn()]       = $id;
        $data[$this->getOptions()->getNameColumn()]     = $this->sessionName;
        $this->getConnection()->insert($this->getOptions()->getTableName(), $data);

        return true;
    }
public function write($id, $data)
    {
        $data = array(
            $this->getOptions()->getModifiedColumn() => time(),
            $this->getOptions()->getDataColumn()     => (string) $data,
        );

        if ($this->find($id)) {
            return $this->getConnection()->update(
                $this->getOptions()->getTableName(),
                $data,
                array(
                    $this->getOptions()->getIdColumn()   => $id,
                    $this->getOptions()->getNameColumn() => $this->sessionName,
                )
            );

        }

        $data[$this->getOptions()->getLifetimeColumn()] = $this->lifetime;
        $data[$this->getOptions()->getIdColumn()]       = $id;
        $data[$this->getOptions()->getNameColumn()]     = $this->sessionName;
        $this->getConnection()->insert($this->getOptions()->getTableName(), $data);

        return true;
    }
{@inheritDoc}