Question

Is that possible to do Eager loading when getting model associations?

Having three models: Category <= Product <= Image.

I want to get all products with images within requested category.

Such call doesn't work:

category.getProducts({include: [Image]})

Any alternative? Or just raw SQL query will help?

Was it helpful?

Solution

Adding suport is underway but not yet implemented: https://github.com/sequelize/sequelize/issues/388

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top