Hello, newcomer here :wave: Since traversing relat...
# prisma-client
g
Hello, newcomer here 👋 Since traversing relations on
findMany
is not supported, I am currently doing a nested
findMany
(the schema has an m-n relationship between the models) for each object in the results. Is there a better way to achieve this?
To close my own question: I used
include
in the
findMany
and extended the result type to be
Array<PrimaryModel & { relationModels: Array<RelationModel> }>
which made the
include
data available on the result type