Skip to content
This repository has been archived by the owner on Jan 5, 2025. It is now read-only.

Support Types in Mongodb Prisma #127

Open
masterbater opened this issue May 21, 2022 · 3 comments
Open

Support Types in Mongodb Prisma #127

masterbater opened this issue May 21, 2022 · 3 comments

Comments

@masterbater
Copy link

No description provided.

@benkroeger benkroeger added invalid This doesn't seem right needs more info and removed invalid This doesn't seem right labels May 29, 2022
@n0t-r0n1t
Copy link

In case of Enum Array it does @ApiProperty({ enum: X[] }) wheras it should be @ApiProperty({ enum: [X] })

@gwesterman
Copy link

I think these are two different issues.

The issue reported by @n0t-r0n1t still persists, I'm currently running into the same problem and it warrants its own ticket.

The original issue in this topic is something I've already brought up with another generator library for Prisma.

Starting with version 3.10.0 Prisma started supporting embedded documents in MongoDB.

This requires declaring a type in the schema like this:

// schema.prisma

model Product {
  id     String  @id
  name   String
  photos Photo[]
}

type Photo {
  height Int
  width  Int
  url    String
}

This will cause the following error to be thrown:

Error: related model 'Photo' for 'Product.photos' not found

@shankiflang
Copy link

Same problem for me, any help ?
image
result :
Error: related model 'TokenData' for 'Community.tokenData' not found

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

No branches or pull requests

5 participants