Closed ViliusRuskys closed 1 year ago
The solution should be moving the WHERE condition into the SELECT result, to not exclude those elements, but I am having issues during this with sqlite IIF
or CASE
statements, I will talk to some ecdb developers.
updated the PR with a fix, going to merge and publish probably
published, closing
Transformer does not resolve provenance for deleted elements if that element contains a random ExternalSourceAspect in reverse synchronization workflow.
Pre fedGuid update all elements had to contain an ExternalSourceAspect in order to track provenance, so in order to track provenance for deleted elements the transformer had to query deleted ExternalSourceAspects (in reverse sync workflow). If a deleted element had no ExternalSourceAspect, that meant the element does not exist in original iModel and no delete operation must be performed. That is achieved by these WHERE statements in
remapDeletedSourceEntities()
Post fedGuid update elements' provenance is tracked by federation guids. Now if an element contains a random ExternalSourceAspect (that was not created by the transformer), the above mentioned WHERE statement actually excludes the element from the query results because that random ExternalSourceAspect will not match the
Kind
and/orScope.id
columns, hence the provenance will be skipped for the given element.