Quantcast
Channel: JavaScriptMVC Forum
Viewing all articles
Browse latest Browse all 3491

Re : model subclass missing model find methods (like findOne)

$
0
0
This is because findOne, findAll etc. are static and not prototype methods. So you can call them with
  1. CustDtlModel.findOne()
On actual instances you need to access the constructor property:
  1. var cm1 = new CustDtlModel();
  2. cm1.constructor.findOne(); // == CustDtlModel.findOne()

Viewing all articles
Browse latest Browse all 3491

Trending Articles