Wie kann ich subquery in Pony ORM für Abfrage wieIN-Klausel in Pony orm Abfrage
SELECT *
FROM child_table
WHERE child_table.masterno IN (SELECT masterno
FROM mastertable
WHERE mastertable.recorddate > SYSDATE -1)
In einem anderen Wort verwenden. Ich wollte somthing wie
master_result = target_model.mastertable.select()\
.filter(lambda mt: mt.recorddate > DATE)
output = target_model.child_table.select()\
.filter(lambda ct: ct.masterno in master_result)
tun bekam ich Fehler
pony.orm.sqltranslation.IncomparableTypesError: Incomparable types 'int' and 'mastertable' in expression: ct.masterno in master_result
wo master_result ist
print(type(master_result))
< 'pony.orm.core.QueryResult>