Remove unused data

This commit is contained in:
Raymond Feng 2014-07-28 09:36:04 -07:00
parent 7ad22939ab
commit 5221d12305
1 changed files with 0 additions and 5 deletions

View File

@ -720,7 +720,6 @@ HasManyThrough.prototype.exists = function (acInst, done) {
var modelThrough = definition.modelThrough;
var pk1 = definition.keyFrom;
var data = {};
var query = {};
var fk1 = findBelongsTo(modelThrough, definition.modelFrom,
@ -732,12 +731,8 @@ HasManyThrough.prototype.exists = function (acInst, done) {
var fk2 = findBelongsTo(modelThrough, definition.modelTo, pk2);
query[fk1] = this.modelInstance[pk1];
query[fk2] = (acInst instanceof definition.modelTo) ? acInst[pk2] : acInst;
data[fk1] = this.modelInstance[pk1];
data[fk2] = (acInst instanceof definition.modelTo) ? acInst[pk2] : acInst;
modelThrough.count(query, function(err, ac) {
done(err, ac > 0);
});