Ok I found something which moved me closer to solution.
It is possible to do a SELECT using
"reverse" relation like this:
QDjangoQuerySet<Asset> assets;
matched = assets.filter(QDjangoWhere("file__name", QDjangoWhere::Equals, "filename.txt");
Here the file has FK to asset.
But this does not work if the other table is 2 "levels" away from Asset like:
QDjangoQuerySet<Asset> assets;
matched = assets.filter(QDjangoWhere("subtitletrack__language", QDjangoWhere::Equals, "eng");
The table
subtitletrack has FK to
file(there could be more subtitle streams in file) and file has FK to
asset.
QDjango cannot find a connection from subtitletrack to asset.
My workaround is to add FK from subtitletrack to asset, but I am not very happy with this.
I was searching for how this works in django but didnt find anything.