Returns the domain relationship object for the given resource
        attribute.

def get_relationship(self, attribute):
        """
        Returns the domain relationship object for the given resource
        attribute.
        """
        rel = self.__relationships.get(attribute.entity_attr)
        if rel is None:
            rel = LazyDomainRelationship(self, attribute,
                                         direction=
                                            self.relationship_direction)
            self.__relationships[attribute.entity_attr] = rel
        return rel