samchon/prisma-markdown

Support MongoDB embedded objects.

csellis opened this issue · 1 comments

Loving the tool, thank you!
I'd like to know if you've covered MongoDB and Prisma.

It supports embedded document syntax which would be handy to have mapped.

model User {
  id      String   @id @default(auto()) @map("_id") @db.ObjectId
  email   String   @unique
  name    String?
  address Address? 👈
  posts   Post[]
}

// Address is an embedded document
type Address {
  street String
  city   String
  state  String
  zip    String
}

I've not used MongoDB through Prisma.

Can you give me a reproducible prisma schame file?

Also, how should I express the nested type in the document?

MongoDB is not relational database, so wonder whether that ERD is meaningful for the NoSQL MongoDB