One-way Relationships

Is it possible to create one-way relationships? I have a table for 'quoteItems' and I'd like to be able to link multiple 'materials' (another table) to it. Ideally though, I'd just write these materials to the 'quoteItems' table row and for drizzle to reference the items within that same row on a column perhaps called 'associated_materials'. Right now, I have a semi convoluted solution. In my table, I have a column for 'associated_material_ids' (a json column) which has ID's in an array. Then, when I go to get the data from the server, I first call the quoteChips in one query and in a separate query, collect those ID's and combine it into one unified object. This works but it's pretty manual and in drizzle studio, I can't preview which tables I'm referencing within the same view how a one-to-many relationship would look. Any ideas? Also open to other solutions!
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server