protected function historize($parentId, $textMD5, $newId)
    {
        /** @var $query \eZ\Publish\Core\Persistence\Database\UpdateQuery */
        $query = $this->dbHandler->createUpdateQuery();
        $query->update(
            $this->dbHandler->quoteTable($this->table)
        )->set(
            $this->dbHandler->quoteColumn('is_original'),
            $query->bindValue(0, null, \PDO::PARAM_INT)
        )->set(
            $this->dbHandler->quoteColumn('link'),
            $query->bindValue($newId, null, \PDO::PARAM_INT)
        )->set(
            $this->dbHandler->quoteColumn('id'),
            $query->bindValue(
                $this->getNextId(),
                null,
                \PDO::PARAM_INT
            )
        )->where(
            $query->expr->lAnd(
                $query->expr->eq(
                    $this->dbHandler->quoteColumn('parent'),
                    $query->bindValue($parentId, null, \PDO::PARAM_INT)
                ),
                $query->expr->eq(
                    $this->dbHandler->quoteColumn('text_md5'),
                    $query->bindValue($textMD5, null, \PDO::PARAM_STR)
                )
            )
        );
        $query->prepare()->execute();
    }
protected function historize($parentId, $textMD5, $newId)
    {
        /** @var $query \eZ\Publish\Core\Persistence\Database\UpdateQuery */
        $query = $this->dbHandler->createUpdateQuery();
        $query->update(
            $this->dbHandler->quoteTable($this->table)
        )->set(
            $this->dbHandler->quoteColumn('is_original'),
            $query->bindValue(0, null, \PDO::PARAM_INT)
        )->set(
            $this->dbHandler->quoteColumn('link'),
            $query->bindValue($newId, null, \PDO::PARAM_INT)
        )->set(
            $this->dbHandler->quoteColumn('id'),
            $query->bindValue(
                $this->getNextId(),
                null,
                \PDO::PARAM_INT
            )
        )->where(
            $query->expr->lAnd(
                $query->expr->eq(
                    $this->dbHandler->quoteColumn('parent'),
                    $query->bindValue($parentId, null, \PDO::PARAM_INT)
                ),
                $query->expr->eq(
                    $this->dbHandler->quoteColumn('text_md5'),
                    $query->bindValue($textMD5, null, \PDO::PARAM_STR)
                )
            )
        );
        $query->prepare()->execute();
    }
protected function historize ( $ parentId , $ textMD5 , $ newId ) { /** @var $query \eZ\Publish\Core\Persistence\Database\UpdateQuery */ $ query = $ this -> dbHandler -> createUpdateQuery ( ) ; $ query -> update ( $ this -> dbHandler -> quoteTable ( $ this -> table ) ) -> set ( $ this -> dbHandler -> quoteColumn ( 'is_original' ) , $ query -> bindValue ( 0 , null , \ PDO :: PARAM_INT ) ) -> set ( $ this -> dbHandler -> quoteColumn ( 'link' ) , $ query -> bindValue ( $ newId , null , \ PDO :: PARAM_INT ) ) -> set ( $ this -> dbHandler -> quoteColumn ( 'id' ) , $ query -> bindValue ( $ this -> getNextId ( ) , null , \ PDO :: PARAM_INT ) ) -> where ( $ query -> expr -> lAnd ( $ query -> expr -> eq ( $ this -> dbHandler -> quoteColumn ( 'parent' ) , $ query -> bindValue ( $ parentId , null , \ PDO :: PARAM_INT ) ) , $ query -> expr -> eq ( $ this -> dbHandler -> quoteColumn ( 'text_md5' ) , $ query -> bindValue ( $ textMD5 , null , \ PDO :: PARAM_STR ) ) ) ) ; $ query -> prepare ( ) -> execute ( ) ; }
Updates single row matched by composite primary key.

Sets "is_original" to 0 thus marking entry as history.

Re-links history entries.

When location alias is published we need to check for new history entries created with self::downgrade()
with the same action and language, update their "link" column with id of the published entry.
History entry "id" column is moved to next id value so that all active (non-history) entries are kept
under the same id.

@param int $parentId
@param string $textMD5
@param int $newId
Updates single row matched by composite primary key .