Can still use null for required field in Prisma

From this doc: https://www.prisma.io/docs/orm/prisma-schema/data-model/models#optional-and-mandatory-fields, aren't all fields that isn't marked with "?" required? I can still use null while inserting record with Prisma Studio. Please see photos attached. Thanks in advance for answers.
Prisma
Models
Learn about the concepts for building your data model with Prisma: Models, scalar types, enums, attributes, functions, IDs, default values and more.
No description
No description
Solution:
Not sure exactly what is going on as Ive never used prisma studio before but your nulls might be coerced to empty strings?
Jump to solution
4 Replies
Solution
Vincent Udén
Vincent Udén4mo ago
Not sure exactly what is going on as Ive never used prisma studio before but your nulls might be coerced to empty strings?
KingCambo
KingCambo4mo ago
Possible, let me check
KingCambo
KingCambo4mo ago
Look like you're right, I ran a query inside a server component and the result shows empty string
No description
No description
KingCambo
KingCambo4mo ago
Thank you sir.
Want results from more Discord servers?
Add your server
More Posts