DT
Drizzle Team•11mo ago
dew

Nested one to one relation shows [x:string]: never

I tried using the relational query similar to the example
const users = await db.query.users.findMany({
with: {
posts: {
with: {
comments: true,
},
},
},
});
const users = await db.query.users.findMany({
with: {
posts: {
with: {
comments: true,
},
},
},
});
however, when i try to access the result, eg. users.posts.comments, the type is missing & only shows [x:string]: never
1 Reply
dew
dew•11mo ago
the expected result would allowing me to further access the properties of 'comments' Issue resolved, the 'comments' schema wasnt imported 🙃