public function loadAutogeneratedEntry($action, $parentId = null)
{
/** @var $query \eZ\Publish\Core\Persistence\Database\SelectQuery */
$query = $this->dbHandler->createSelectQuery();
$query->select('*')->from($this->dbHandler->quoteTable($this->table))->where($query->expr->lAnd($query->expr->eq($this->dbHandler->quoteColumn('action'), $query->bindValue($action, null, \PDO::PARAM_STR)), $query->expr->eq($this->dbHandler->quoteColumn('is_original'), $query->bindValue(1, null, \PDO::PARAM_INT)), $query->expr->eq($this->dbHandler->quoteColumn('is_alias'), $query->bindValue(0, null, \PDO::PARAM_INT))));
if (isset($parentId)) {
$query->where($query->expr->eq($this->dbHandler->quoteColumn('parent'), $query->bindValue($parentId, null, \PDO::PARAM_INT)));
}
$statement = $query->prepare();
$statement->execute();
return $statement->fetch(\PDO::FETCH_ASSOC);
}