From 9573a240c68f8d38e6583c36d3a06ad30bf049f6 Mon Sep 17 00:00:00 2001 From: Piotr Date: Wed, 9 Oct 2024 16:20:20 +0200 Subject: [PATCH] Update comments explaining SF query limits --- src/salesforce_archivist/salesforce/salesforce.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/salesforce_archivist/salesforce/salesforce.py b/src/salesforce_archivist/salesforce/salesforce.py index ed39bcf..c5b1bc7 100644 --- a/src/salesforce_archivist/salesforce/salesforce.py +++ b/src/salesforce_archivist/salesforce/salesforce.py @@ -66,13 +66,14 @@ def _get_content_document_list_query(self) -> str: where = "" if len(where_conditions): where = "WHERE {}".format(" AND ".join(where_conditions)) + # Using WHERE IN and not using filter on `LinkedEntity.Type` is done because of SF restrictions like: # - # Implementation restriction: ContentDocumentLink requires a filter by a single Id on ContentDocumentId - # or LinkedEntityId using the equals operator or multiple Id's using the IN operator. + # Implementation restriction: ContentDocumentLink requires a filter by a single ID on ContentDocumentId + # or LinkedEntityId using the equals operator or multiple ID's using the IN operator. # # Implementation restriction: filtering on non-id fields is only permitted when filtering - # by ContentDocumentLink.LinkedEntityId using the equals operator. + # by ContentDocumentLink.LinkedEntityId using the equal operator. return ( "SELECT {fields} FROM ContentDocumentLink "