Define association in Sequelize - Nest js
Aug 18, 2023 · 2 min read · Say we have two model portfolio and stock. Each item from the portfolio belongs to one stock. We need to define this relationship in sequelize. The general rule is to have a column stockId in the portfolio that will map with the id from stock table. ...
Join discussion