【问题标题】:Delete function not working in JSONStore in Mobilefirst Platform删除功能在 Mobilefirst 平台的 JSONStore 中不起作用
【发布时间】:2016-07-14 12:07:01
【问题描述】:

我正在尝试删除存储在 JSONStore 中的值。我正面临这个错误:

03-26 18:52:10.391: I/chromium(1890): [INFO:CONSOLE(0)] "document.clear() is deprecated. This method doesn't do anything.", source:  (0)

并且该值没有被删除。

代码如下:

function clear() {
    var collectionName = 'people';

    //Build the query object
    var query = {
        _id: 3
    };

    var options = {
        exact: true
    };

    try {

        WL.JSONStore.get(collectionName).remove(query, options)

        .then(function(res) {
            alert("Success" + res);
        })

        .fail(function(errorObject) {
            alert(errorObject.msg);
        });

    } catch (e) {
        _logError("");
    }
}

非常感谢您的帮助。谢谢。

【问题讨论】:

  • 你的 moiblefirst 版本是什么?
  • 我使用的是 7.1 版。
  • 请以这种方式提供您的版本(例如 MobileFirst 7.1.0.00-20151227-1725)
  • Mobilefirst 版本:7.1.0.00.20151005-1721

标签: json ibm-mobilefirst jsonstore


【解决方案1】:

嗯,这个错误发生是因为你设置了 clear 函数但是 moiblefist(worklight) 有这种类型的 API clear 所以我认为这是一个错误。你应该使用另一个不在 moiblefist API 方法中的名称。

或尝试http://www-01.ibm.com/support/docview.wss?uid=swg2C7000003#71中的最新版本

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-07-17
    • 2018-10-16
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多