Can't Null a Compound-unique Value
I have something like this:
I'm attempting to do a query like this:
model MyModel {
fieldOne String
fieldTwo String
fieldThree String?
@@unique([fieldOne, fieldTwo, fieldThree])
}model MyModel {
fieldOne String
fieldTwo String
fieldThree String?
@@unique([fieldOne, fieldTwo, fieldThree])
}I'm attempting to do a query like this:
prisma.MyModel.upsert({
where: {
fieldOne_fieldTwo_fieldThree: {
fieldOne: 'one',
fieldTwo: 'two',
fieldThree: null, // this gives me a typeerror, claiming it must be a string. fieldThree is nullable, so it *should* be allowed!
}
}
})prisma.MyModel.upsert({
where: {
fieldOne_fieldTwo_fieldThree: {
fieldOne: 'one',
fieldTwo: 'two',
fieldThree: null, // this gives me a typeerror, claiming it must be a string. fieldThree is nullable, so it *should* be allowed!
}
}
})