If my model definition is this: ``` type PortalUse...
# orm-help
j
If my model definition is this:
Copy code
type PortalUser {
  portalId: String! @unique
  createdAt: DateTime!
  updatedAt: DateTime!
  cart: PortalCart @relation(name: "UserCart", onDelete: CASCADE)
  OTTAuthorizations: [OTTAuthorization!]!
    @relation(name: "UserOTTAuthorizations", onDelete: CASCADE)
  isGuest: Boolean! @default(value: "true")
  dummy: String! @default(value: "Dummy")
}
And I try to see if a PortaUser exists using this:
const userExists = await prisma.portalUser({ portalId: viewer.id })
I get this:
"Error: Cannot convert undefined or null to object",
Is this expected behavior, and if so, what am I doing wrong?
d
Can you please share you prisma cli version and prisma-client-lib version?
This is fixed on the latest stable -
1.25.3
, please install it via
npm install -g prisma
and
npm install --save prisma-client-lib
j
Oh man! Thank you. I updated Prisma bindings but didn’t see that one. Things work great again
👌 1