Querying DB returning same row for two different userIds
Hi everyone 👋 ,
I am running into an issue where I have two different users logged in (one on Chrome and one on Safari) to test multiple users logging in at once. One user has submitted a ballot and the other has not. However, with the one that has not voted,
hasVoterVoted
is returning true AND getUsersVote
is returning the vote of the other user. I logged out user.userId
and they are different in each call... So why would drizzle/supabase be returning the exact same information for two different userId? My guess is due to the eq(model.userId, user.userId) && eq(model.year, year) && eq(model.week, week)
because if I remove the check for year and week in the hasVoterVoted
, it returns false for the user who has not voted.1 Reply
Hmm I think I need to do