Yes, the main problem here is that when using the TDDatabase put method, you need to copy over the attachments yourself because you'll not be supplying an _attachments dictionary that the TDDatabase method requires. See [CDTDatastore.m#L423-L443](https://github.com/cloudant/CDTDatastore/blob/master/Classes/common/CDTDatastore.m#L423-L443).

If at all possible, I'd use the `-updateDocumentWithId:prevRev:body:inTransaction:rollback: error:` in CDTDatastore rather than TD_Datastore's version.

Possibly, at the point we need to understand other instances of TD_Datastores `-putRevision:...` that you are using. I think that, in general, updates that are happening in response to calls to our API layer are going to have to go via other calls in our API layer as we're starting to introduce custom functionality.