You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The generated CreateDto does not include the null type for optional scalar fields.
Expected Behaviour
If a scalar field is nullable, the null type should be included in the CreateDto file.
The example below shows the middleName field being defined as optional in Prisma. Prisma treats this as automatic nullable in the database (and generates the correct type in @prisma/client).
However, the type generated in CreateDto is string instead of string | null.
Issue
The generated CreateDto does not include the
null
type for optional scalar fields.Expected Behaviour
If a scalar field is nullable, the
null
type should be included in the CreateDto file.The example below shows the
middleName
field being defined as optional in Prisma. Prisma treats this as automatic nullable in the database (and generates the correct type in @prisma/client).However, the type generated in CreateDto is
string
instead ofstring | null
.Example:
schema.prisma
create-person.dto.ts
The text was updated successfully, but these errors were encountered: