© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
Drizzle TeamDT
Drizzle Team•2y ago•
2 replies
jacob.pastorek

Select in nested findMany query ?

Hi, I need some help with part of my code
I have
many-to-many
many-to-many
relation between two tables
items
items
and
subcategories
subcategories
and third relation table named
itemsToSubCategoriesTable
itemsToSubCategoriesTable


I get the response as expected with nested
with
with
statement

but the result is
"items": [
{
"items": {
"id": 8,
"name": "novinky",
"slug": "novinky",
"content": ""
}
}, .... another "items" ]

but i want items: [ {item1} , {item2} ]

is it possible ?
screen.png
Drizzle TeamJoin
The official Discord for all Drizzle related projects, such as Drizzle ORM, Drizzle Kit, Drizzle Studio and more!
11,879Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Nested object in select query?
Drizzle TeamDTDrizzle Team / help
2y ago
orderBy in nested findMany
Drizzle TeamDTDrizzle Team / help
2y ago
Conditional Select in M2M findMany Type Inference
Drizzle TeamDTDrizzle Team / help
3y ago
FindFirst vs FindMany and Select
Drizzle TeamDTDrizzle Team / help
2y ago