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
Hello and thanks for the amazing package! I'm in this situation where I need to use a value that comes from a type, the problem is that the relation field (jobDepartmentId) can be null but the Zod schema isn't adding the nullish() method to the schema. I tried writeNullishInModelType but didn't work. If I manually add nullsh() to the schema it works again but now i'm stuck with this, any clue??
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello and thanks for the amazing package! I'm in this situation where I need to use a value that comes from a type, the problem is that the relation field (jobDepartmentId) can be null but the Zod schema isn't adding the nullish() method to the schema. I tried writeNullishInModelType but didn't work. If I manually add nullsh() to the schema it works again but now i'm stuck with this, any clue??
thanks!!
model Job { jobId String @id @default(uuid()) jobTitle String @unique @db.VarChar(255) minSalary String maxSalary String department Department? @relation(fields: [jobDepartmentId], references: [departmentId]) jobDepartmentId String? @default(uuid()) description String @db.Text jobResponsibilities String[] jobQualifications String[] incompleteEntry Boolean @default(false) requiredSkills String[] benefits String[] requiredExperience Int active Boolean @default(true) employees Employee[] createdAt DateTime @default(now()) updatedAt DateTime @updatedAt }
Beta Was this translation helpful? Give feedback.
All reactions