Hi, can i get an advise how to best return all dat...
# orm-help
s
Hi, can i get an advise how to best return all data which is not null or false? deleted: { not: true, }, Will not return fields with null: https://www.prisma.io/docs/reference/api-reference/prisma-client-reference#remarks-21 Do i really have to do: where: { OR: [ { deleted: null }, { deleted: false }, ], },
1
r
Hi @spohl - without checking, would this work:
Copy code
where: {
  deleted: { in: [null, false] }
}
?
s
Hi @Richard Ward, thanks for your reply. I already tried this but it doesnt let me do it:
Type '{ in: false[]; }' is not assignable to type 'boolean | BoolNullableFilter'.
Object literal may only specify known properties, and 'in' does not exist in type 'BoolNullableFilter'.
n
in
operator could be used only to check if a value exists in a list. In your case you would need to use
OR
operator as you have mentioned to match records having deleted value as false or null.