Adding suport is underway but not yet implemented: https://github.com/sequelize/sequelize/issues/388
Eager loading in model associations getter
-
01-09-2022 - |
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?
Solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow