Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

Problem


A property of an entity is not of the correct type.

Solution


Identify the affected property in the MetaEd source files. Correct the property type and rebuild MetaEd. All technical artifacts related to the property will be updated.

Discussion


MetaEd properties declarations are composed of two parts. The first is the MetaEd keyword which defines the kind of MetaEd entity that the property refers to. "string", "descriptor", and "domain entity" are all examples of property keywords.

The second part can refer to either an explicitly defined entity or an implicitly defined simple type. Explicit entities are those defined elsewhere using the MetaEd language. An example would be "School" defined elsewhere starting with "Domain Entity School". Implicitly defined simple types are a convenience for declaring a simple type in the only place it will be used. An example would be a property "string XYZOnlyHere" where there is no other mention of that simple type in any other entity. 

Consider the following code snippets:

Domain Entity BellSchedule
    documentation "This entity represents the schedule of class period meeting times."
    domain entity EducationOrganization
        documentation "The education organization for which the BellSchedule is defined."
        is part of identity
    ...
Abstract Entity EducationOrganization 
    ...
Domain Entity School based on EducationOrganization
    ...

BellSchedule has a primary key reference to the more general entity EducationOrganization. To change the reference to the more specific entity School, change the BellSchedule listing to read:

Domain Entity BellSchedule
    documentation "This entity represents the schedule of class period meeting times."
    domain entity School
        documentation "The school for which the BellSchedule is defined."
        is part of identity
    ...

Note that this kind of change often impacts the property documentation.

MetaEd Cookbook Contents

Read the MetaEd Cookbook recipes:

  • No labels