Subtype Support For MDFs

If your model extends another model and the parent model has MDFs defined, you can inherit the properties of those MDFs into your own MDFs by defining an MDFs file in the dependent module.

The following table depicts MDF subtyping:


Module A

Module B (depends on A)

Module C (depends on B)

Foo.model

  • TestString

Foo.mdfs

  • BMdfString

Foo.mdfs

  • CMdfString

Bar.model (subtype of Foo)

  • TestString (parent property)

  • MyOwnString

Bar.mdfs

  • OwnMdf

  • BMdfString (parent property)



For subtypes to work for MDFs:


  1. You will need to define at least an empty MDF file where the parent MDF file exist, i.e. Bar.mdfs in Module B. If there is no MDFs file, it will not generate any MDFs, even if the parent type has MDFs.

  2. Once you have defined an MDF file, the MDFs Editor will bring in all fields inherited from the parent MDFs.

    1. You can override the inherited field except the FieldName and FieldType property.

    2. You can define the additional owning fields to the MDFs.

In the above example, MDFs subtype won’t work for Module C as there is no Bar.mdfs in Module C. However, as soon as you define Bar.mdfs in Module C, subtyping will work.