KJReactor
11/17/2020, 1:33 AM_const_ _user = await _prisma_.user.findMany({
where: {
OR: [
{ email: {equals: _email_} },
{ phone: {equals: _phone_} }
]
},
take: 1
for some reason result that don't satisfy either conditionsRyan
11/17/2020, 7:13 AMKJReactor
11/17/2020, 1:59 PMRyan
11/17/2020, 2:01 PM[]
if no conditions are satisfied. Could you share your Prisma version so that I can reproduce?KJReactor
11/17/2020, 2:03 PMRyan
11/17/2020, 2:28 PMwhere
clause is executed in SQL or not.KJReactor
11/17/2020, 2:30 PMKJReactor
11/17/2020, 2:31 PMRyan
11/17/2020, 2:32 PMRyan
11/17/2020, 2:32 PMprisma generate
and try?KJReactor
11/17/2020, 2:34 PMKJReactor
11/17/2020, 3:10 PMCannot read property 'filter' of undefined
Ryan
11/17/2020, 3:17 PM@prisma/cli
and @prisma/client
to 2.11.0 the test folder above and ran prisma generate
which works fine.Ryan
11/17/2020, 3:17 PMKJReactor
11/17/2020, 3:20 PMRyan
11/17/2020, 3:22 PMnode_modules
and running npm i
again.KJReactor
11/17/2020, 3:50 PMRyan
11/17/2020, 3:51 PMKJReactor
11/17/2020, 3:53 PMKJReactor
11/17/2020, 3:55 PMRyan
11/17/2020, 4:01 PMpreviewFeatures
block anymore.Ryan
11/17/2020, 4:01 PMKJReactor
11/17/2020, 4:06 PMRyan
11/17/2020, 4:08 PMschema.prisma
?KJReactor
11/17/2020, 4:59 PMgenerator client {
provider = "prisma-client-js"
previewFeatures = ["insensitiveFilters"]
}
datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
}
KJReactor
11/18/2020, 1:25 PMKJReactor
11/18/2020, 1:26 PMRyan
11/18/2020, 1:27 PMKJReactor
11/18/2020, 1:30 PMKJReactor
11/18/2020, 1:31 PMRyan
11/18/2020, 1:33 PMconst prisma = new PrismaClient({
log: ['query'],
})
This will log all queries generated by Prisma in your console.
https://www.prisma.io/docs/about/faq#how-can-i-see-the-generated-queries-that-prisma-client-sends-to-my-databaseKJReactor
11/18/2020, 1:38 PMKJReactor
11/18/2020, 1:38 PMKJReactor
11/19/2020, 5:04 PMKJReactor
11/19/2020, 5:05 PMKJReactor
11/19/2020, 5:05 PM