What I have is a Log table with employee_ids (integers) that references the employee table.
I need to retrieve all logs for a given list of Employee names. The best I can do looks like this:
Log.query.join(Log.employee).filter(Employee.name.in_(['carl', 'joe']))
This works however it's terribly slow, I've learned that IN isn't very good for anything but integers but I'm not sure how to arrange my query to find the ids to use for the IN.