prisma-generator-nestjs-dto
prisma-generator-nestjs-dto copied to clipboard
Support Types in Mongodb Prisma
In case of Enum Array it does @ApiProperty({ enum: X[] }) wheras it should be @ApiProperty({ enum: [X] })
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
Same problem for me, any help ?
result :
Error: related model 'TokenData' for 'Community.tokenData' not found