r/node•
reactionjs

Quick question (Sequelize associations)

I need to make a self joining table called Friendships.

This table would grab the user ids of those who’ve accepted friend requests from one another and place them in the friendship table as such

friendId user1_id user2_id

But I can not for the life of me figure how to set this up in my models. Anybody mind helping me out here?

Edit: figured it out - if anybody needs a solution for a similar issue DM me

Posted Jun 4, 2019, 3:24 PM UTC · edited

20
Loading comments…