public function getSiteFilterQuery($targetTableAlias)
    {
        $parent = $this->getParent();
        if ($parent and $parentId = $parent->getId()) {
            return $targetTableAlias . '.site_id = ' . $parentId;
        } elseif ($id = $this->getId()) {
            return $targetTableAlias . '.site_id = ' . $id;
        }

        return '';
    }