On Sep 24, 2015, at 4:22 PM, Drew Wilson 
<[email protected]<mailto:[email protected]>> wrote:

I'd like to do this in the Sync Gateway's mapping function, so that my 
application(s) doesn't have to implement this, and to simplify my application's 
update logic.

You can’t; the sync function can’t modify the revision it’s working on.

Revisions are created by clients, and all Sync Gateway does is store and 
transmit them. (OK, you can create revisions in Sync Gateway by using its REST 
API, but that’s different from replication.)

If this isn't advisable, where should I do this? CBLModel:willSave:?

Yup, that’s a good place.

And is there a way to get the current user used by the replicator? Or should I 
just store this myself on my datastore object?

You’d have to remember it yourself.

—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/E1FD8905-6F65-4846-B022-22830626A44B%40couchbase.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to