Furkan Kinyas
Furkan Kinyas
DTDrizzle Team
Created by Furkan Kinyas on 7/30/2023 in #help
how is remove nested relation name "collection". Used many-to-many relationship.
request: await db.query.products.findMany({ with: { collections: { columns: { product_id: false, collection_id: false, }, with: { collection: { columns: { id: false, }, }, }, }, }, }); response: [ { "id": "0189a651-9ea3-79a7-a1c8-cd1d765c4717", "name": "product 3", "rating": 3, "html_description": "product 3 desc", "collections": [ { "collection": { "name": "collection1", "description": "collection1 desc" } } ] } ]
2 replies