Need help transform a nested prisma query to drizzle
Hey I'm trying to translate the following prisma query to drizzle:
closest i've come to is this:
but when trying to move the settings object into the course object as it is in the prisma query I get an error
Object literal may only specify known properties, and 'hostAlias' does not exist in type 'SQL<unknown> | Aliased<unknown> | AnyMySqlColumn<{}>'
is there any way to get the same result with drizzle? thank you very much for your help! drizzle is awesome!2 Replies
I fear that we can't nest objects like that. (2 levels)
You will have to refine the result in js.
My project has a "repository layer" that outputs "raw" results from DB. Then I refine the resulting shape for my needs
oh that's sad, but at the end of the day not a big problem - thank you!