Specify collection length
This commit is contained in:
parent
a31a10a5ae
commit
f59cf0ddbf
|
@ -2,7 +2,7 @@ language: node_js
|
||||||
node_js:
|
node_js:
|
||||||
- 0.4.12
|
- 0.4.12
|
||||||
- 0.6
|
- 0.6
|
||||||
- 0.8.9
|
- 0.8.11
|
||||||
services:
|
services:
|
||||||
- mongodb
|
- mongodb
|
||||||
- redis-server
|
- redis-server
|
||||||
|
|
|
@ -340,6 +340,7 @@ AbstractClass.all = function all(params, cb) {
|
||||||
if (data && data.countBeforeLimit) {
|
if (data && data.countBeforeLimit) {
|
||||||
collection.countBeforeLimit = data.countBeforeLimit;
|
collection.countBeforeLimit = data.countBeforeLimit;
|
||||||
}
|
}
|
||||||
|
collection.length = data.length;
|
||||||
cb(err, collection);
|
cb(err, collection);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
@ -420,7 +420,6 @@ function validationFailed(inst, v, cb) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function skipValidation(inst, conf, kind) {
|
function skipValidation(inst, conf, kind) {
|
||||||
console.log(conf, kind, inst.hasOwnProperty(conf[kind]), inst[conf[kind]]);
|
|
||||||
var doValidate = true;
|
var doValidate = true;
|
||||||
if (typeof conf[kind] === 'function') {
|
if (typeof conf[kind] === 'function') {
|
||||||
doValidate = conf[kind].call(inst);
|
doValidate = conf[kind].call(inst);
|
||||||
|
|
Loading…
Reference in New Issue