Uploaded image for project: 'Couchbase Documentation'
  1. Couchbase Documentation
  2. DOC-6759 Add NOTE discouraging the use of top level prefixes on Couchbase Lite client
  3. DOC-7609

Backport-DOC-6759-2x1 - Add NOTE discouraging the use of top level prefixes on Couchbase Lite client

    XMLWordPrintable

Details

    Description

      102920 - Create common content and backport implementation to 2-0 – base on https://docs.couchbase.com/couchbase-lite/current/android/learn/java-android-document.html#document-constraints

      Although documentation specifies that documents not be modeled using top level attributes with "_" prefixes, we must update the documentation with following clarifications

      • Couchbase Lite APIs do not explicitly disallow the use of attributes with the underscore prefix at the top level of document. This is to facilitate the creation of documents for use in "local only" mode (i.e. where documents are not synced) or when used exclusively in peer-to-peer sync. However, users are cautioned that attempts to sync such documents to the Sync Gateway at a later time will result in an error. Hence, to be future proof, it is advised that users refrain from creating such documents.
      • "_id", :"_rev" and "_sequence" are reserved keywords and must not be used as attributes . Use of these attributes for user-level data may result in undefined system behavior.

      *Please add relevant highlighting in form of NOTES to get users attention**

      Also, please add a reference to the Data Modeling page from following pages (Since the data modeling section is under Sync Gateway, this will likely be missed by Couchbase Lite developers)
      *

      CC Ian Bridge

      Location: https://docs.couchbase.com/sync-gateway/2.7/data-modeling.html
      Referrer: https://docs.couchbase.com/sync-gateway/2.7/gs-sgw-install.html
      User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_3) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.5 Safari/605.1.15
      Screen Resolution: 1792 x 1120

      Attachments

        Issue Links

          Activity

            People

              Ian.bridge Ian Bridge
              Ian.bridge Ian Bridge
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                PagerDuty