© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
Drizzle TeamDT
Drizzle Team•3y ago•
10 replies
robboten

explain relationName please

Could anyone explain how to use relationName when you have many to many for example. Found following on github:

"relationName is already supported, just not documented. So you can use it exactly as you've described. You'll just need to add where clauses to the corresponding with entries."
"relationName is already supported, just not documented. So you can use it exactly as you've described. You'll just need to add where clauses to the corresponding with entries."

https://github.com/drizzle-team/drizzle-orm/issues/811

But doesn't explain how to use where. I have found some information about how to add it in relations, but not in the actual query.
GitHub
[FEATURE]: Allow alias for relational queries · Issue #811 · drizzl...
Describe what you want I have a use case where I need to query related data that is not always related by the same fields (i.e., it has different relations "types"), but I need to always ...
[FEATURE]: Allow alias for relational queries · Issue #811 · drizzl...
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

TypeScript error when specifying `relationName` in a one-to-one relation
Drizzle TeamDTDrizzle Team / help
3y ago
explain analyze to find indexes is a hassle
Drizzle TeamDTDrizzle Team / help
9mo ago
Need a review / suggestion please
Drizzle TeamDTDrizzle Team / help
2y ago
Can someone explain how can I use .onConflictDoUpdate with array of values?
Drizzle TeamDTDrizzle Team / help
2y ago