On Jul 13, 2014, at 7:33 PM, Seung Chan Lim <[email protected]> wrote:

> Is it possible to add an attribute to a document in the sync funciton? For 
> example. add a "last updated" attribute on a document with time stamp 
> "JSON.stringify(new Date())"?

No; that would mess up the revision tracking, because you'd effectively be 
creating a new revision of the document every time it got replicated to the 
server. (And then that revision would get replicated back to every client...)

Generally you'd have the client update that timestamp when it modifies a 
document. It's usually more useful to know the time at which the document was 
actually created/updated, rather than the time that it got synced to the server.

--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/F206AF51-68A3-4D09-896E-539CB89A91F1%40couchbase.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to