Search
Star
Feedback
Setup for Free
© 2026 Hedgehog Software, LLC
Twitter
GitHub
Discord
System
Light
Dark
More
Communities
Docs
About
Terms
Privacy
How to create Prisma Client's generated types with nested models? - Prisma
P
Prisma
•
2y ago
•
4 replies
fivewen
How to create Prisma Client's generated types with nested models?
Hi guys
,
I am currently trying to define generate model types using Prisma
.validator to include relations
.
I
've followed this documentation
:
https://www.prisma.io/docs/orm/prisma-client/type-safety/operating-against-partial-structures-of-model-types#problem-using-variations-of-the-generated-model-type
However
, I am confused how I can set up with model with nested models
.
For example
, I have a Post that has UserSocial Model
. In addition
, UserSocial has 1 to 1 relationship with User model
.
I want to generate a PostWithUserSocial but also has the nested User model included
.
Does anyone know how I can achieve this
?
Operating against partial structures of your model types | Prisma D...
This page documents various scenarios for using the generated types from the Prisma namespace
Prisma
Join
The official Discord server of Prisma! Find us online at prisma.io
9,819
Members
View on Discord
Resources
ModelContextProtocol
ModelContextProtocol
MCP Server
Similar Threads
Was this page helpful?
Yes
No
Similar Threads
Generated Prisma Client
P
Prisma / help-and-questions
8mo ago
TypeScript errors with new `prisma-client` generated client
P
Prisma / help-and-questions
12mo ago
how to keep it generated in @prisma/client
P
Prisma / help-and-questions
4mo ago
types from @prisma/client
P
Prisma / help-and-questions
16mo ago