KSDaemon/sails-hook-sequelize

Model is not defined.

taronqal opened this issue · 2 comments

I followed all instructions.
And I created Post model and tried to retrieve all post records from the db table.

            .populate("responses")
            .exec(function(err, posts){
                if(err){
                    return res.send(err);
                }
                return res.send(JSON.stringify(posts));
            })```
Cannot read property 'define' of undefined

Hi @devman113 Can you provide more details. May be gist or test repo with sails config, model definition, full response processing function.

It is fixed. I forked the working sample and it works now. Thanks for your quick response and consideration. You can close the issue.