How to get multi objects in different #530
Answered
by
collerek
ponytailer
asked this question in
Q&A
-
Such like in sqlalchemy: db.session.query(A,B).filter(A.aid == B.bid) |
Beta Was this translation helpful? Give feedback.
Answered by
collerek
Jan 30, 2022
Replies: 1 comment
-
Right now it's not possible directly (no way to run arbitrary queries). If A and B are related by fk/m2m you can get A as children of B or B as children of A with standard selects, otherwise you have to split into two queries - one per each model. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
ponytailer
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Right now it's not possible directly (no way to run arbitrary queries).
If A and B are related by fk/m2m you can get A as children of B or B as children of A with standard selects, otherwise you have to split into two queries - one per each model.