how to get StandAlone model in before hook to include it in context and how to mention muliple associated models in include

 context => {
                 const AssociatedModelMunitionFuses = context.app.services.munitionfuses.Model;
                 const AssociatedModelMunitionDescription = //StandAloneModel;
                 context.params.sequelize = {
                 //Require multiple models to include
                 include: [{ model: AssociatedModelMunitionFuses }]
               };
               return context;
            },
1

There are 1 best solutions below

0
On

Found this solution on slack community

const AssociatedModelMunitionDescription = app.get('sequelizeClient').models.munitionDescription;