Uploaded image for project: 'Couchbase Documentation'
  1. Couchbase Documentation
  2. DOC-4521

[guides] clarify restrictions on modeling data for mobile

    XMLWordPrintable

Details

    • New Feature
    • Resolution: Fixed
    • Critical
    • Mobile 2.1
    • Mobile 2.1
    • sync-gateway
    • 1

    Description

      Sync Gateway will not process documents that have a top level attribute that begins with an underscore ("_").  So any document that is expected to be processed

      The reason for this is that Sync Gateway is backwards compatible with V1.0 of replication protocol which is based on CouchDB. The v1.0 of replication protocol prohibits the use of top level attributes that begin with an underscore.

      So applications that create documents that are expected to  be processed through the Sync Gateway must be aware of this when modeling their data. This is true whether the document is created through the CBS SDK or SGW API or CBL. Failure to do so will result in a Sync Error of the form ""error":"Bad Request","reason":"user defined top level properties beginning with '' are not allowed in document body"}_" 

       

      Recommendation : Include the _ properties in a top level object 

       

       

      Attachments

        Issue Links

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

          Activity

            People

              jamiltz James Nocentini
              priya.rajagopal Priya Rajagopal
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty