Closed homedirectory closed 1 year ago
Note: if #1877 gets merged before this branch, then a conflict will have to be resolved on this branch.
Note: if #1877 gets merged before this branch, then a conflict will have to be resolved on this branch.
@homedirectory, I think it is best if we could stack this up -- first merge #1877 and then this issue. Hence, please merge Issue-#1877
into the branch for this issue and change the base for https://github.com/fieldenms/tg/pull/1899 to be Issue-#1877
.
Description
Currently property
desc
should be metamodeled only when an entity is annotated with@DescTitle
or it declares propertydesc
. Also, generated meta-models reflect the hierarchical structure of their underlying entities, i.e., meta-model of a subtype extends the meta-model of a supertype.More specifically, there are 2 cases where entity meta-models should include
desc
:@DescTitle
is present directly for an entity or one of its super types.desc
is declared in an entity type or its super types, with the exclusion ofAbstractEntity
(where it is declared presently).A special case was observed when property
desc
was erroneously omitted from generation. Specifically, it happens when a metamodeled entity declares@DescTitle
, while its metamodeled parent entity does not. For example:Both meta-models would be missing property
desc
, while it is expected of the meta-model forEntityB
to have it.Expected outcome
Property
desc
is metamodeled for all entities that are either annotated with@DescTitle
or declare propertydesc
.