Uploaded image for project: 'Couchbase .NET client library'
  1. Couchbase .NET client library
  2. NCBC-2634

Expiry returned with entire document when ContentAs invoked

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.0.4
    • 3.0.5
    • library
    • None
    • 1

    Description

      When document is fetched with expiration:

      var jObject = new JObject
      {
          ["TestProp"] = "SomeValue"
      };
       
      var mutResult1 = await collection.InsertAsync(id1, jObject, insertOptions => insertOptions
          .Expiry(TimeSpan.FromMilliseconds(10000)));
       
      var getResult1 = await collection.GetAsync(id1);
      var value1 = getResult1.ContentAs<JObject>();
      Console.WriteLine(value1.ToString(Formatting.Indented));
       
      Console.WriteLine("--------------------------------------------");
       
      var getResult2 = await collection.GetAsync(id1, getOptions => getOptions.Expiry());
      var value2 = getResult2.ContentAs<JObject>();
      Console.WriteLine(value2.ToString(Formatting.Indented));
      

      Output (expected):

      {
        "TestProp": "SomeValue"
      }
      

      Output (actual)

      {
        "$document": {
          "exptime": 1598520403
        },
        "": {
          "TestProp": "SomeValue"
        }
      }
      

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          There are no comments yet on this issue.

          People

            jmorris Jeff Morris
            jmorris Jeff Morris
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty