Hi, all. The Typescript types generated by Prisma ...
# orm-help
g
Hi, all. The Typescript types generated by Prisma don't seem to have properties for related models. Like, if a
Person
can have an
Address
, there's no
address
property on the generated
Person
type. Do I need to define my own type here, or is there a Prismaish way to handle this?
n
Hey Greg 👋 Glad you found the docs section. Only scalar fields are included in the generated types and relation fields are not included by default. The ideal way would be to use prisma validator function as described in the reference here.