47ng / 47ng/prisma-field-encryption

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

Đang mở
#119 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
TypeScript
Star
306
Fork
40
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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 } }
});
}
```

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.