Row.find({CodeRow:'000000000000'}).exec(function(err,cRoot){ Row.find({IdParentRow:cRoot.IdRow}).exec(function(err,cRows){ console.log(_.map(cRows,'CodeRow')); cRows.forEach(function(R){ var toRemove = []; if (R.isLeaf()){ toRemove.push(R); } var l = toRemove.length; toRemove.forEach(function(RR){ R.remove(function(err){ console.log(R.NameRow,"Remove"); if (--l==0) return done && done(); }); }) }) }) })