how to create relatedWords relation for each words using drizzle. | DRIZZLE | SQL |
Hi folks,
I'm building an online Turkish dictionary using t3 stack with drizzle. I want every word can have related words so that I can show them in related words section when a word searched.
What I tried is to create another table called
Here's what I tried with drizzle schemas and relations:
Drizzle studio throws this error:
It's been a while since I created SQL relationships last time and I've never done such a relationship like this. Thanks in advance for any help!
I'm building an online Turkish dictionary using t3 stack with drizzle. I want every word can have related words so that I can show them in related words section when a word searched.
What I tried is to create another table called
relatedWords that includes an id and relatedWordId in order to create many-to-many relationship between word and relatedWords.Here's what I tried with drizzle schemas and relations:
Drizzle studio throws this error:
Error: There is not enough information to infer relation "__public__.relatedWords.wordsToRelatedWords"It's been a while since I created SQL relationships last time and I've never done such a relationship like this. Thanks in advance for any help!

