Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filtering with 'where: { fieldName: { in: ['value1', 'value2'] } } Not Supported #119

Open
SteveKekacs opened this issue Aug 8, 2024 · 0 comments

Comments

@SteveKekacs
Copy link

I have a simple user table with an encrypted email field (and corresponding emailHash field), and need to be able to filter users where their email is in a list of emails (see below).

This is returning 0 results, because filtering with the in clause isn't implemented.

model User {
  ...
  email     String? @unique /// @encrypted
  emailHash String? @unique /// @encryption:hash(email)
}
const getUsersByEmails = async (emails: string[]) => {
  // This returns 0 results, despite their being users with matching emails
  return prisma.user.findMany({
    where: { email: { in: emails } }
  });
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant