Associating/Deassociating existing aspect to feature might not be reflected in aspect

Issue #217 resolved
Matthias Schoettle created an issue

When a feature is associated with an existing aspect and the concern is saved the aspect does not have/get this information. The same happens when you deassociate an aspect from a feature and save the concern.

Steps to reproduce:

  1. Open a concern
  2. Associate feature with existing aspect
  3. Save concern

Result:

The aspect does not have the realizes reference set to the feature (check the serialized model for that).

Possible solution:

This is because the aspect's realizes is changed, however, the aspect is never saved.

I think when saving the concern, all associated aspects should be saved as well.

Comments (7)

  1. Matthias Schoettle reporter

    References issue #217: Moved saving into the handler (from the scene) and added saving all COREModels that are part of the concern. Since right now the models reference from COREConcern is not maintained properly, the models that are saved are also in addition all models that realize a feature.

    This leads to one limitation: If an aspect is removed from the feature, the aspect will never be saved.

    → <<cset 3b39899ac722>>

  2. Matthias Schoettle reporter
    • changed status to open

    Once issue #215 is resolved, the save implementation needs to be updated to just iterate through all associated COREModels of the concern and save them. That way, also aspects that were deassociated will be saved.

  3. Matthias Schoettle reporter

    To fix affected models, do the following:

    1. Open all the .ram models in a text editor and remove the <realizes.../> tags (first children of <ram:Aspect.../>).
    2. In the concern, remove all associations on the features and associate them again.
    3. Save the concern.
  4. Log in to comment