Perform an update on all the related models.

        :param attributes: The attributes
        :type attributes: dict

        :rtype: int

def update(self, _attributes=None, **attributes):
        """
        Perform an update on all the related models.

        :param attributes: The attributes
        :type attributes: dict

        :rtype: int
        """
        if _attributes is not None:
            attributes.update(_attributes)

        if self._related.uses_timestamps():
            attributes[self.get_related_updated_at()] = self._related.fresh_timestamp()

        return self._query.update(attributes)