I suggest that you want to use the method in the request with or . options()eagerload()eagerload_all()
, Controlled , changes, DocumentChange, dco, dco . , eagerload_all(). declarative ( , ), m.Session - (thread-local).
from sqlalchemy.orm import eagerload, eagerload_all
...
controlled_docs = (m.Session.query(m.Controlled)
.options(eagerload_all('changes.dco'))
.order_by('number')
.all())
, , , , ORM, , , .