Search
Star
Feedback
Setup for Free
© 2026 Hedgehog Software, LLC
Twitter
GitHub
Discord
System
Light
Dark
More
Communities
Docs
About
Terms
Privacy
Relations in schema - Drizzle Team
DT
Drizzle Team
•
3y ago
•
3 replies
jmandrosz
Relations in schema
Hi
, I am a little bit confused about defining relations and foreign keys
, why I need to define application level relation with
"relations
" keyword if I can just define foreign key by references and use it in my select query with join statement
?
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
Recent Announcements
Similar Threads
Was this page helpful?
Yes
No
Similar Threads
zod schemas, main schema, and relations in separate files
DT
Drizzle Team / help
3y ago
Union of schema with relations
DT
Drizzle Team / help
3y ago
Defining relations of schemas in separate files
DT
Drizzle Team / help
2y ago
Orderby in including relations
DT
Drizzle Team / help
2y ago