You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When selecting entities of a scoped model, the as value of the include options, that are NOT defined within the scope, is not inferred by sequelize-typescript:
Company.scope('bla').findAll({include: [User]}).catch(...)// throws "User is not associated to Company!";
Current workaround:
Company.scope('bla').findAll({include: [{model: User,as: 'users'// <-- this need to be set explicitly}]}).catch(...);
The text was updated successfully, but these errors were encountered:
Assuming the following defined models:
When selecting entities of a scoped model, the
as
value of the include options, that are NOT defined within the scope, is not inferred by sequelize-typescript:Current workaround:
The text was updated successfully, but these errors were encountered: