Merge pull request #160 from strongloop/feature/fix-upsert-remoting
Make sure 'upsert' is used as the remote operation name
This commit is contained in:
commit
21b467e649
|
@ -222,7 +222,10 @@ function stillConnecting(dataSource, obj, args) {
|
|||
* @param {Object} data The model instance data
|
||||
* @param {Function} callback The callback function (optional).
|
||||
*/
|
||||
DataAccessObject.upsert = DataAccessObject.updateOrCreate = function upsert(data, callback) {
|
||||
// [FIXME] rfeng: This is a hack to set up 'upsert' first so that
|
||||
// 'upsert' will be used as the name for strong-remoting to keep it backward
|
||||
// compatible for angular SDK
|
||||
DataAccessObject.updateOrCreate = DataAccessObject.upsert = function upsert(data, callback) {
|
||||
if (stillConnecting(this.getDataSource(), this, arguments)) {
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue