why did the sequele ignore the references property?

In order to request a model with linked models you should add explicit associations between models like this:

Task.belongTo(User, { foreignKey: 'task_user_id' })

And after that you can query tasks along with a linked user like this:

const u = await Task.findAll({ raw: true, include: [User] });

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top