Querying from list of related in SQLalchemy and Flask,User.query.join(User.person).filter(Person.id.in_(p.id for p in people)).all()