How to insert foreign key in sequelize model
问题 I have a User model and a Houses model in sequelize. I also have a UserHouse model that contains {user_id, house_id}. How do I populate values in the UserHouse model. I went through the sequelize documentation but could not get a clear idea. I need to know, how to insert user_id and house_id in UserHouse model. I also cannot understand what associations should I use between these models. Any help will be appreciated. Edited : One More issue: I have one more model HouseInfo that stores house