Uploaded image for project: 'Couchbase Mobile'
  1. Couchbase Mobile
  2. CM-68

Support Partial doc sync through Sync Gateway

    XMLWordPrintable

Details

    Description

      As a Sync Gateway consumer I would like to skip some of the fields syncing in and out from a device. 

      The end consumer would not like to receive some of the control fields the application uses. 

      for example the real document is:

      { "doc_type_id": 3, "doc_type_name": "some name", *"is_active": true,* "is_attached": true, }

       

      The mobile device would get only a subset of the document when configured.
      for example is_active is not necessary.

      { "doc_type_id": 3, "doc_type_name": "some name", "is_attached": true, }

       

       

      Workaround :
      Use eventing service that will generate a new  "mobile" version of the document to sync with  mobile clients. This option is reasonable when it is a pull only replication and changes are pulled down by Couchbase lite clients. Although two separate buckets need to be maintained as eventing service does not work on R-W bucket with Sync Gateway.

      Things get complicated if the documents are modified and pushed up by Couchbase Lite. In that case, a reference the base document needs to be maintained within the modified document so the eventing service  can appropriately patch back the changes to the base document

      Forums:
      https://forums.couchbase.com/t/allow-access-to-certain-fields-of-document/27857

      Attachments

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

        Activity

          People

            priya.rajagopal Priya Rajagopal
            roi.katz Roi Katz
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty