Closed tuopuu closed 7 years ago
In the case the above functionality is implemented then we should also prevent removing of CUDSComponents that are referenced somewhere else in the model to keep the model consistent. Removal of the referencing object should be done first before allowing removal of the referenced object.
I see your point. Let's keep this as a separate issue/PR and keep the above mentioned PR relatively small.
Yaml serialisation implemented in #322 generates yaml for all included and referenced CUDSComponents in a model, even if referenced objects are not directly in the model.
@mehdisadeghi , with #312, Could you please add a check to
model.CUDS.add
that if the added CUDSComponent contains references to other components (as in the case of MaterialRelation it will hold references to a number of Material objects), then these are also added to the model (if they don't already exist there).