Open mainglis opened 10 years ago
All those functions are available on instances only:
User.create({ name: 'John', last_name: 'Smith' }, function (err, john) {
if (err) throw err;
console.log(typeof john.getType); // function
console.log(typeof john.setType); // function
});
It's unclear if in the stack overflow question the problem occurs on the model User
or instance john
.
We seem to be experiencing the same problems noted in this Stack Overflow post: http://stackoverflow.com/questions/20112605/node-orm2-association-functions-are-not-created
Any guidance?
Thanks!