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.
Solution:Jump to solution
Not sure exactly what is going on as Ive never used prisma studio before but your nulls might be coerced to empty strings?
4 Replies
Solution
Not sure exactly what is going on as Ive never used prisma studio before but your nulls might be coerced to empty strings?
Possible, let me check
Look like you're right, I ran a query inside a server component and the result shows empty string
Thank you sir.