STARIONGROUP/COMET-SDK-Community-Edition

Implement instance version checks in Annex.C3

lxatstariongroup opened this issue · 0 comments

Prerequisites

  • I have written a descriptive issue title
  • I have verified that I am running the latest version of the COMET-SDK
  • I have searched open and closed issues to ensure it has not already been reported

Description

Implement instance version checks in Annex.C3:
Case: A Parameter references a SampledFunctionParameterType (model version 1.3) and an Annex.C3 export is created for model version 1.0.0
Currently the SampledFunctionParameterType itself is filtered out because of the fact that the class has a version attribute stating it is a 1.3.0 model version class. SampledFunctionParameterType is therefore not in the export file. The Parameter however, is still there and it references the Iid of the SampledFunctionParameterType which is not in the file. When trying to import the file, the import fails as the foreign key constraint from ParameterBase to ParameterType (SampledFunctionParameterType is filtered out) is failing.

Make sure that:

  • These references are updated, so no foreign key constraint errors anymore.
  • If the result of removing the reference is an incompatible model, remove the referencing object from the model and thrown a ModelErrorException if that still leads to an inconsistent model.