Associate the model instance to the given parent.

        :type model: orator.Model

        :rtype: orator.Model

def associate(self, model):
        """
        Associate the model instance to the given parent.

        :type model: orator.Model

        :rtype: orator.Model
        """
        self._parent.set_attribute(self._foreign_key, model.get_key())
        self._parent.set_attribute(self._morph_type, model.get_morph_name())

        return self._parent.set_relation(
            self._relation, Result(model, self, self._parent)
        )