why can't create data with spread operator #23966
Unanswered
febrimaulana
asked this question in
Q&A
Replies: 1 comment
-
Hi @febrimaulana 👋 The error message indicates that there's a mismatch between the data you're trying to insert and the prisma schema for the purchaseOrder model. Specifically, the error points out that the data object you're using in the spread operator Can you please share your schema so I can attempt a reproduction? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Bug description
I have a json request like this example
When I want to insert with the spread operator like the code below it always produces an error
but if i like this it works
even though the body data has been validated with DTO and the fields and data types are all the same
here is the error
How to reproduce
Expected behavior
No response
Prisma information
// Add your schema.prisma
// Add your code using Prisma Client
Environment & setup
Prisma Version
Beta Was this translation helpful? Give feedback.
All reactions