[英]How can I do a multiple-level eager load in SQLAlchemy?
I have many C
s in a B
and many B
s in an A
, and I have backref relationships defined. 我有许多
C
在A S B
和许多B
S IN的A
,我已经backref定义的关系。 What I want to do is something like: 我想做的是:
a = A.query().options(subqueryload(A.b).subsubqueryload(B.c)
How should this be done? 该怎么做?
直接来自subqueryload
的文档:
qry = query(A).options(subqueryload(A.b).subqueryload(B.c))
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.