def add_constraints(self):
        """
        Set the base constraints of the relation query
        """
        if self._constraints:
            self._query.where(self._foreign_key, "=", self.get_parent_key())