1
A
回答
0
這被稱爲SQLAlchemy的文檔的Adjacency List Relationships,建議的模型結構是這樣的:
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")
相關問題
- 1. 在sqlalchemy查詢中使用for循環
- 2. 循環查詢
- 3. sqlalchemy循環依賴
- 4. SQLAlchemy獲取每行匹配查詢並循環遍歷它們
- 5. PHP查詢循環
- 6. CTE循環查詢
- 7. I4GL循環查詢
- 8. php輪詢循環查詢
- 9. 循環中的SQL查詢循環中
- 10. 夏娃SQLAlchemy的查詢連環
- 11. SQLAlchemy查詢 - Python
- 12. SQLAlchemy查詢
- 13. SQLAlchemy的查詢
- 14. Flask-SQLAlchemy查詢
- 15. mysql查詢子查詢循環?
- 16. 查詢查詢或分組循環
- 17. MYSQL查詢 - 加入或循環查詢
- 18. SQL更新\循環查詢
- 19. MySQL查詢:循環語句
- 20. while循環與查詢
- 21. PHP for循環查詢
- 22. Excel VBA:循環Web查詢
- 23. 帶循環的小查詢?
- 24. For循環java查詢
- 25. 停止循環AJAX查詢
- 26. 在while循環中查詢
- 27. node.js mysql for循環查詢
- 28. SPARQL「for循環」查詢
- 29. 帶循環的SQL查詢
- 30. Facebook查詢循環問題