© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
Drizzle TeamDT
Drizzle Team•3y ago
A_Dev

reference composite primary key

I have a table with a composite primary key. I’m using the return object to make it by passing in the columns to primaryKey. How do I then use that as a foreign key in a child table? I tried referencing the return object but that doesn’t work.
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

Composite Primary Key?
Drizzle TeamDTDrizzle Team / help
16mo ago
How to reference to composite primary key
Drizzle TeamDTDrizzle Team / help
9mo ago
Composite primary key, multiple primary keys
Drizzle TeamDTDrizzle Team / help
2y ago
Compostie primary key of a composite primary key
Drizzle TeamDTDrizzle Team / help
2y ago