Hi I would like to do a filter with my query using a joinedload. But I can't seem to make it work. Below is my sample query
result = (
session.query(Work).
options(
joinedload(Work.company_users).
joinedload(CompanyUser.user)
).
filter(Work.id == 1).
filter(User.first_name == 'The name'). <<--- I can't get this to work.
all()
)
When running this it's returning a row that is more than what I'm expecting. The real result should only return 8rows. But upon executing this query it returns 234 rows which is way more than what I expect