dresende / node-orm2

Object Relational Mapping
http://github.com/dresende/node-orm2
MIT License
3.07k stars 376 forks source link

Double calling callback in db.load #778

Closed antishov closed 7 years ago

antishov commented 7 years ago
const argumentsList = modelsNamesList.map(modelName => `${__dirname}/models/${modelName}`);
argumentsList.push(callback);
db.load(...argumentsList);

In this example callback for the last item in array will be called two times: when model was loaded and when "files" variable will be empty. Error in file ORM.js, line 278

dxg commented 7 years ago

Can you please provide a fully functioning sample? Along the lines of https://github.com/dresende/node-orm2/issues/326#issuecomment-49588445

antishov commented 7 years ago

I can't reproduce error now, sorry