I want findAll in sequelzie to return raw formatted data instead of creating instances for each result or returning unformatted raw data. I tried doing this by setting raw in query options to true but while the returned data is raw it is not longer formatted so if I try to do eager loading, the associations won't be nested.
db.Model1.findAll({ where: { x: true }, include: [db.Model2] }, { raw: true })
This call would return a flat array with instances of Model1 being followed by instances of Model2. This is noted in the documentation for the raw query option: "If true, sequelize will not try to format the results of the query, or build an instance of a model from the result". Is there any way to get the formatting but not the instance building?