I have tried using eager loading in combination with the $get method on a sequelize object:
await user?.$get("following", {
order: [["name", "ASC"]],
limit: USERS_PER_PAGE,
offset: (page - 1) * USERS_PER_PAGE,
where,
include: Gym
}
The query worked fine, until I added the include parameter. It returns an Array of users that have a 1:1 relation to the Gym model through a foreign key in the Gym model. Including the Gym works fine with the findOne and findMany method.
This approach leads to the Promise neither resolving nor rejecting with an error.
Am I missing something/doing somethig wrong or is this an error in sequelize-typescript?