There is a classic example: query = Album.select().join(Artist) , but this query does not select the Artist.name field.
How to choose it?
Or how can I combine two tables without a JOIN ?
|
There is a classic example: query = Album.select().join(Artist) , but this query does not select the Artist.name field.
How to choose it?
Or how can I combine two tables without a JOIN ?
Source: https://ru.stackoverflow.com/questions/843558/
All Articles
query = Album.select(Artist.name, *Album._meta.fields.values()).join(Artist)should select all Album and Artist.name fields. - godva