Firstly, I am new to Couchbase development. I am creating an android application which requires user’s sign in and sign up process. There are multiple options for sign in like email, google and facebook. So I need to reference all this options to signle document. So I found this article about reference document here: http://docs.couchbase.com/developer/dev-guide-3.0/lookups.html
So When a user sign in with Google or Facebook or Email i’ll pass the something like g::ID, fb::ID or email::email_id which can refer to single user profile document if matches(through reference documents as mentioned in the link). If it matches sync gateway should return the document with the details.
Else if any of those doesn’t match with any user profile document it should return null so that it takes a sign up process automatically and create a new user profile document. This thing should happen through sync gateway REST API so that sync gateway can have the newly created document in its memory.
So, for this newly created document I need to add reference documents through sync gateway’s REST API so that it can point to that user profile for next sign in. Unfortunately, I am not able to find anything on how can I create reference documents using Couchbase Lite? Or Is there any other way to handle this type of situation in any other way?
EDIT: As I understood, There is no document type like reference document. It is a simple new document with different keys containing same user id. So the value which is stored in it is an integer (or can be string). There is no key value pair in the document. So how can I create a document using Couchbase Lite for Android with only a value and not a key value pair?