79425871

Date: 2025-02-09 23:56:11
Score: 2
Natty:
Report link

The solution I found was to use an alias & subquery.

with _Session() as s:
    stmt = select(Student.latest_exams).join(Student).where(Student.name=='Joe Bloggs')
    exam_alias = aliased(Exam, stmt.subquery())
    results = s.execute(select(exam_alias))
Reasons:
  • Probably link only (1):
  • Low length (0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: frimann