Chip Clark
06/25/2021, 10:54 PMprisma.person.findUnique()
invocation
Invalid `prisma.person.findUnique()` invocation:
{
where: {
PKPersonID: {
PKPersonID: 7
}
~~~~~~~~~~~~~~~
I have two functions that are nearly identical. One fails with the above error, the other works fine.
This works:
personByID(id: any) {
const personID = this.prisma.person.findUnique({
where: {
PKPersonID: id
},
include: defaultIncludeQuery
})
return personID;
}
This gives an error:
personWContacts(id: any) {
const personContacts = this.prisma.person.findUnique({
where: { PKPersonID: id },
include: contactsIncludeQuery
})
return personContacts;
}
I can switch the includes but the error remains with the personWContacts function.