Attachment doc in sync gateway 3.X

Hi Team,
we are migrating from sync-gw 2.8 to 3.x. question here is, how do we identify the binary attachment to a document. In2.8 version, we can get the sha value and prefix with _sync:att:sha then we can get the actual binary document, but 3.x version we see another sha value added(hope it is the generated based on the document values) but we do get exact document like 2.8.

Thanks.

Attachments created/modified in 3.x have a `1:1` association with a regular document, rather than `1:many`, so the attachment key also includes a reference to the owning document.

We do this so we’re able to automaically clean up associated attachments on document removal.

Thanks @bbrks , so looks like we can’t directly get the binary attachment id. we have to search with suffix - meta().id like ‘%sha-id’. am i correct?