> On Oct 23, 2014, at 8:26 AM, Christoph Berlin <[email protected]> wrote: > > I also install the app on a a different device and log back in. It is my > current understanding that the profile documents gets created again, is that > correct? But it doesn’t seem right or how are the two documents with the same > document name handled? Do they update incrementally?
It's considered a conflict, just a special case where there is no common ancestor. > Asked a bit differently, our solution requires a profile document however > when the user logs in from a device, we want to check whether a profile > document already exists, sync first and then use it or create one if it > doesn’t exist already? If the profile doc will have the exact same contents no matter where it's created, then you can just create it immediately; there won't be a conflict because the revision IDs will be identical. But probably a lot of the time that won't be the case, e.g. you might store something like a creation date that won't be the same on every device. In the general case, you'll need to run a pull replication first before trying to create the profile document, to determine whether it already exists. Or instead, you could write custom code to send a GET to the server to look for the document. —Jens -- You received this message because you are subscribed to the Google Groups "Couchbase Mobile" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/mobile-couchbase/9A5B7094-1F10-4B19-97A4-C94176604BA8%40couchbase.com. For more options, visit https://groups.google.com/d/optout.
