firely-net-sdk
firely-net-sdk copied to clipboard
SnapshotGenerator: Keep snapshot when differential is missing
Problem:
If the snapshot generator encounters a StructureDefinition
(of type LogicalModel) that already has a snapshot, but not a differential, it will remove that snapshot without replacing it (only when SnapshotGeneratorSettings.ForceRegenerateSnapshots
is set to true
)
Solution The SnapshotGenerator should not remove a snapshot when there is no differential present in a StructureDefinition.
Alternatives
- Create an extra setting
SnapshotGeneratorSettings.SkipRegenerateOnMissingDifferential
- Throw an Exception
- Add a warning to the
OperationOutcome
Additional context In bulk snapshot operations this situation tends to go unnoticed and leads to loss of data / correctness in publications.