Search
Star
Feedback
Setup for Free
© 2026 Hedgehog Software, LLC
Twitter
GitHub
Discord
System
Light
Dark
More
Communities
Docs
About
Terms
Privacy
Do I need to define both "defineRelations" and "foreignKey" ? - Drizzle Team
DT
Drizzle Team
•
2mo ago
•
4 replies
JustUseFirefox
Do I need to define both "defineRelations" and "foreignKey" ?
drizzle orm
PostgreSQL
Documentation is unclear
.
https://orm.drizzle.team/docs/relations-v2
have no mention of foreign keys
.
"Ask AI
" said there is no documentation about it but I should define both
.
I
'm very confused
.
Drizzle ORM - Drizzle Relations
Drizzle ORM is a lightweight and performant TypeScript ORM with developer experience in mind
.
Drizzle Team
Join
The official Discord for all Drizzle related projects, such as Drizzle ORM, Drizzle Kit, Drizzle Studio and more!
11,879
Members
View on Discord
Resources
ModelContextProtocol
ModelContextProtocol
MCP Server
Similar Threads
Was this page helpful?
Yes
No
Similar Threads
foreignKey function options
DT
Drizzle Team / help
13mo ago
ForeignKey Too Long
DT
Drizzle Team / help
3y ago
What is the difference between defineRelations and defineRelationParts ?
DT
Drizzle Team / help
2mo ago
Is it necessary to define both sides of a relation?
DT
Drizzle Team / help
2y ago