The findAll
etc. methods you are defining are constructor methods not prototype methods. That means that you have to call it on the Foo
object and not the foo
instance (I usually name my Model and instances of it differently as not to confuse them - e.g. var bar = new Foo()
).
Foo.findAll({}, function(data) {
});
// Or a little nicer:
Foo.findAll({}).then(function(data) {
});