Details
-
Technical task
-
Resolution: Fixed
-
Critical
-
Mobile 2.1
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)
*
- https://docs.couchbase.com/couchbase-lite/2.7/swift.html#document
- https://docs.couchbase.com/couchbase-lite/2.7/java-platform.html#document
- https://docs.couchbase.com/couchbase-lite/2.7/java-android.html#document
- https://docs.couchbase.com/couchbase-lite/2.7/csharp.html#document
- https://docs.couchbase.com/couchbase-lite/2.7/objc.html#document
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