DT
Drizzle Team•8mo ago
Dio

Schema for that links user > friends

Hello, I am trying to do a schema that links users and friends (https://gist.github.com/imaginamundo/d990e63f0aaba7244a173d8fe28f06bb). But I am probaly messing something up, because I get an error that says there is not enought information between those tables. The literal error is: Error: There is not enough information to infer relation "users.friends". I want to give the full infer relation but don't know how, can anyone help me? 😄
2 Replies
Sillvva
Sillvva•8mo ago
The relation names have to match when disambiguating https://orm.drizzle.team/docs/rqb#disambiguating-relations
Drizzle ORM - Query
Drizzle ORM is a lightweight and performant TypeScript ORM with developer experience in mind.
Dio
DioOP•8mo ago
Nice, thanks, I was trying to have friends to have both 'requested-friends' and 'targeted-friends', but thinking now this seems wrong. Thanks a lot o/
Want results from more Discord servers?
Add your server