Is this query possible using the Query API?

I have this query:
db.query.usersTable.findFirst({ with: { userDetails: true }, where: eq(userDetailsTable.email, email) });

but when ran it throws the error column usersTable.email does not exist even though I'm trying to filter based on userDetailsTable. Is this query not possible using the Query API or am I just doing it incorrectly?
Was this page helpful?