This article is tagged with:
Sqlalchemy filter by relationship
and mysql
sqlalchemy filter by relationship
patients = Patient.query.filter(Patient.mother.has(phenoscore=10))