class Node(Base):
__tablename__ = 'node'
id = Column(Integer, primary_key=True)
parent_id = Column(Integer, ForeignKey('node.id'))
data = Column(String(50))
children = relationship("Node",
backref=backref('parent', remote_side=[id])
)
When using this type of model, how could I query for all linked objects of a parent?
In other words, I need a list that contains all the children and children of children, and children of children of children...