Relational queries result types are not working
Hi,
When i call findMany or findFirst with no args, the result type is
When i include
with
arg, the result type do not provide the relational type
query
result type
8 Replies
am i missing something?
i using monorepo and per-file schema
How is your table and your relation defined?
@Noahh
Heres the tripModel:
trip.ts
your relation from trip->riderModel is called
riders
, try using that in with
also, when you define relationships using
one
you should specify fields
and references
. I'd recommend reading the RQB docs a little more to improve the relations https://orm.drizzle.team/docs/rqbRelational queries – DrizzleORM
Drizzle ORM | %s
@Noahh
Still not returning riders
Oh, thank you
@Noahh its now working, thank you
Great!