Search
Star
Feedback
Setup for Free
© 2026 Hedgehog Software, LLC
Twitter
GitHub
Discord
System
Light
Dark
More
Communities
Docs
About
Terms
Privacy
Prisma - creating row with empty array fields - Theo's Typesafe Cult
TTC
Theo's Typesafe Cult
•
4y ago
•
8 replies
AvPirate
Prisma - creating row with empty array fields
Hi
, I have a user table in which I have a reference field of the Story table
, written like this
:
story Story
[
]
When I create a new user
, since this field cannot be optional in prisma
, I write it like this
:
return await prisma.story.create({
data: {
...
story: [],
},
});
return await prisma.story.create({
data: {
...
story: [],
},
});
I get this error
: got invalid value
[
] on prisma
.createOneStory
. Provided List
<
>
Theo's Typesafe Cult
Join
26,564
Members
View on Discord
Resources
ModelContextProtocol
ModelContextProtocol
MCP Server
Recent Announcements
Similar Threads
Was this page helpful?
Yes
No
Similar Threads
Prisma allowing empty DB fields
TTC
Theo's Typesafe Cult / questions
4y ago
Prisma `delete` a row with composite keys
TTC
Theo's Typesafe Cult / questions
3y ago
Prisma: Asyncronous Extended Fields
TTC
Theo's Typesafe Cult / questions
4y ago
Planetscale pushing to an Array with Prisma?
TTC
Theo's Typesafe Cult / questions
3y ago