iTwin / imodel-transformer

API for exporting an iModel's parts and also importing them into another iModel
MIT License
3 stars 2 forks source link

Added isFirstSynchronization to options #100

Closed simsta6 closed 11 months ago

simsta6 commented 11 months ago

If source iModel had different external source aspects, they were imported to target. Then at the end of transformation detectElementsDeletes was called. It would detect that some elements should be deleted, because transformer would get random identifier values, example: image

MichaelBelousov commented 11 months ago

If source iModel had different external source aspects, they were imported to target. Then at the end of transformation detectElementsDeletes was called. It would detect that some elements should be deleted, because transformer would get random identifier values,

We shouldn't introduce this "new option" because the transformer is going to expose a higher-level Branching API soon, including an initBranch API which would supersede this. Also, it appears that you're adding this because you're not using wasSourceIModelCopiedToTarget in the branch initialization, which is not supported by the transformer.

MichaelBelousov commented 11 months ago

Also adding, it seems the bug this was fixing was due to a default targetScopeElement 0x1 which conflicted with the scope of ExternalSourceAspect's added by others. The default of targetScopeElement is very bad and the default will be removed in 1.x