()
| 98 | |
| 99 | var pending = associations.length; |
| 100 | var autoFetchDone = function autoFetchDone() { |
| 101 | pending -= 1; |
| 102 | |
| 103 | if (pending === 0) { |
| 104 | return cb(); |
| 105 | } |
| 106 | }; |
| 107 | |
| 108 | for (var i = 0; i < associations.length; i++) { |
| 109 | autoFetchInstance(Instance, associations[i], opts, autoFetchDone); |