sqlalchemy filter by relationship
snippet in sql

sqlalchemy filter by relationship

user2962

patients = Patient.query.filter(Patient.mother.has(phenoscore=10))