Select in nested findMany query ?

Hi, I need some help with part of my code I have many-to-many relation between two tables items and subcategories and third relation table named itemsToSubCategoriesTable I get the response as expected with nested 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 ?
No description
2 Replies
piechart
piechart•7mo ago
It will be possible in relational API v2. For now you have to process the result in application code, something like result.items.map(item => item.items)
jacob.pastorek
jacob.pastorekOP•7mo ago
Thank you, I did it that way, but wasn't sure if it's ok like that or i missed something in docs, looking forward for v2 🙂
Want results from more Discord servers?
Add your server