Yields a tuple of (descendent_id, path from entity_id to descendant).
for relationship in self.get_forward_relationships(entity_id):
parent_eid = relationship.parent_entity.id
direct_path = RelationshipPath([(True, relationship)])
yield parent_eid, direct_path
if deep:
sub_entities = self.get_forward_entities(parent_eid, deep=True)
for sub_eid, path in sub_entities:
yield sub_eid, direct_path + path
def get_backward_entities(self, entity_id, deep=False):
Get entities that are in a backward relationship with entity