diff --git a/lib/dao.js b/lib/dao.js index fe406878..dad80cc1 100644 --- a/lib/dao.js +++ b/lib/dao.js @@ -361,7 +361,7 @@ DataAccessObject.updateOrCreate = DataAccessObject.upsert = function upsert(data var hookState = {}; var id = getIdValue(this, data); - if (!id) { + if (id === undefined || id === null) { return this.create(data, options, cb); }