Bundt User's Manual · Bundt Toolset version 1.0.1.0

Extending Models

Extending a type model means changing it so that it is better adjusted to our needs. Extension only works for type models. Instance models cannot be extended.

Details

The model you start from during extension is called a base model. Once you have selected a base model, you can create a new type model that extends from it. The new model that you create, and which extends from the base model, is called a particular model.

Right after creation, the particular model contains copies of all the model elements in the base model. These are copies, so you can change or delete them without affecting the base model.

You can make any changes you wish to a particular model. You can create new classes, attributes, or associations, or you can alter or delete existing ones. If you make many changes, the resulting model may barely resemble the base model. Although this is possible, it is not recommended, as extension means adjusting, not radicaly change. Do not extend a model if you need something very different. Extension is appropriate when you need to make some adjustments while reusing most of the base model elements.

Internally, a particular model keeps a sealed copy of the base model from which it started. This has several consequences:

  • The base model must be valid. The system will validate it for you when you extend it, and let you know if it isn't valid.
  • You can retrieve the base model at any point by extracting it from the particular model, even if the original model has been deleted or you don't keep a copy.

Extension can be recursive. For example, you can extend a model that is itself the result of an extension. This allows for infinite adjustment and tweaking.

You can easily extend a model by using ModelDesigner. To do this, you will need to open first the base model, and then create a new type model and select the base model to use for extension.

See Also


Contents distributed under a Creative Commons Attribution 4.0 International License · About · Terms of Use · Contact Us · last updated on 08 October 2020