16 - Create a New Common Subclass
Problem
The design of a MetaEd model requires the subclassing of a common.
Solution
Create a new common subclass in the MetaEd source files and reference it where necessary. Build MetaEd. All technical artifacts related to the new common subclass will be updated.
Supported Common Subclasses:
Any Common subclass is supported by the Ed-Fi ODS / API.
Inline Commons cannot, at this time, be subclassed.
When an existing common needs additional data to support a specialization of the model, it should be subclassed. The naming convention should follow the naming convention for commons with a semantic discriminator indicating what the specialization of data is for this new type. The base common name is the original common to build on. No property in this type can be marked as is part of primary key. Creating a subclass does not affect the original common. Instead it creates a new type that uses the original common as a base and adds new data. In this way, Common subclasses are different from other subclasses (e.g., Associations) in that the original Common properties are "mirrored" in the new subclass, rather than inherited.
Consider the following declarations:
TelephoneWithCountryCode is a new common subclass which is based on Telephone. Like the original, the subclass includes the properties TelephoneNumber, TelephoneNumberType, OrderOfPriority, TextMessageCapabilityIndicator, and DoNotPublishIndicator. TelephoneWithExtension also includes the new property, CountryCode.