【问题标题】:SubDoc operation in couchbasecouchbase 中的 SubDoc 操作
【发布时间】:2018-06-25 13:43:59
【问题描述】:

我正在使用此代码从特定文档中获取子文档

 DocumentFragment<Lookup> result= bucket.async().lookupIn(docId).get(subDocId).execute().
          toBlocking().singleOrDefault(null);

我不知道为什么,但是

result.rawContent(subDocId)

返回 null,而

result.content(subDocId)

返回正确的值。

谁能指出可能导致此问题的原因?

【问题讨论】:

    标签: couchbase


    【解决方案1】:

    添加 includeRaw(true) 成功了

    DocumentFragment<Lookup> result =  couchbaseBucket.async().lookupIn(docId).get(subDocId).includeRaw(true).execute().
                  toBlocking().singleOrDefault(null);
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-04-29
      • 2016-11-03
      • 1970-01-01
      • 2019-07-17
      • 2014-06-21
      • 1970-01-01
      • 2016-07-13
      • 2023-03-28
      相关资源
      最近更新 更多