-
here is the schema definition
client query code
when i try to query authors including books or chapters or both clauses, it just cant fetch the chapter columns along with the artist
it returns:
I expect the result to include all the fields from the chapters table at the corresponding chapter but is missing that. It only selects the joinTable fields |
Beta Was this translation helpful? Give feedback.
Answered by
ridhwaans
Jul 31, 2024
Replies: 1 comment
-
result = db.query.authorsTable.findMany({
with: {
chapters: {
with: {
chapter: true,
},
},
books: {
with: { book: true },
},
},
}) this one gives the expected result |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
ridhwaans
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
this one gives the expected result