Replies: 2 comments 1 reply
-
Hello @alf5 You can try to change the maybe the generated AccounModel gor the reseller fied is incorrect. if it’s a bug please open issue instead ! See you |
Beta Was this translation helpful? Give feedback.
-
Hi @Romakita I believe this is to do with the generated Model confusing the Prisma CreateArgs type. Another Note: TSED generated Model classes have I think ideally the TSED code generator should generate seperate classes for create, update and entity (with the appropriate validation decorators). If you follow what the Prisma generator does it would probably be a major undertaking (??) (see the output of prisma-zod-generator Maybe as a "good enough" implementation would be to just support the raw DB values and generate create and update classes without properties that are the "Foreign" objects? (with all the validation decorators) |
Beta Was this translation helpful? Give feedback.
-
to recreate
Create a new project with Prisma:
Prisma schema:
executed:
npm run prisma:generate
- all goodexecuted:
npx @tsed/cli g
controllers/AccountController.ts
: - This is pretty much following the docsboth VScode and
npm run build
give an error forthis.repo.create({data})
saying that:Was wondering what I might be doing wrong? or is this a bug? or is there a workaroud for this?
Beta Was this translation helpful? Give feedback.
All reactions