© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
Drizzle TeamDT
Drizzle Team•17mo ago
Bitojoe

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!
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

Relationships: Self one-one & one-many
Drizzle TeamDTDrizzle Team / help
3y ago
Relationships not working? (Simplest one-one relationship)
Drizzle TeamDTDrizzle Team / help
11mo ago
How to insert many rows with one-to-many relationships
Drizzle TeamDTDrizzle Team / help
3y ago
How to make one object have 2 different relationships with another object.
Drizzle TeamDTDrizzle Team / help
2y ago