Ovyerus/prismaliser

Application throws an error when using embedded documents with MongoDB

gwesterman opened this issue · 2 comments

I'm using Prisma together with MongoDB and utilize embedded documents.

When I paste in the following example that makes use of this:

datasource db {
  provider = "mongodb"
  url      = env("DATABASE_URL")
}

generator client {
  provider = "prisma-client-js"
}

model MyModel {
  id    String   @id @default(auto()) @map("_id") @db.ObjectId
  types MyType[]
}

type MyType {
  value  String
  public Boolean
}

I recieve the following error:

Application error: a client-side exception has occurred (see the browser console for more information).

With the following console output:

TypeError: Cannot read properties of undefined (reading 'isList')

I can imagine this happens because Prismaliser was last released before Prisma started supporting embedded documents.

Hey, so sorry for the delay on this. Will try to fix this up this weekend, Prismaliser has been updated to a newer Prisma version now but it look's like this is still happening so I think it's a change in the DMMF in regards to this that is causing it to break, probably ties into #63

Looks like this is no longer occuring after 38546cb, which is now deployed.