diff --git a/lib/dao.js b/lib/dao.js index 7e8194cb..bc04d80b 100644 --- a/lib/dao.js +++ b/lib/dao.js @@ -897,7 +897,10 @@ DataAccessObject.remove = DataAccessObject.deleteAll = DataAccessObject.destroyA * @param {Function} cb Callback called with (err) */ -DataAccessObject.removeById = DataAccessObject.deleteById = DataAccessObject.destroyById = function deleteById(id, cb) { +// [FIXME] rfeng: This is a hack to set up 'deleteById' first so that +// 'deleteById' will be used as the name for strong-remoting to keep it backward +// compatible for angular SDK +DataAccessObject.removeById = DataAccessObject.destroyById = DataAccessObject.deleteById = function deleteById(id, cb) { if (stillConnecting(this.getDataSource(), this, arguments)) return; var Model = this;