Do Annotations pass on to the extended/mixer type?


I have 3 types:

  • MyType1 that has an annotation, e.g. @db
  • MyType2 that extends MyType1
  • MyType3 that mixes in MyType1

Will MyType2 and MyType3 have the annotation too?


yes they will also have the annotation


When you call extensions() on a type by default you get all the inherited extensions from the parent types too. There is a way to refer to the extensions on the type itself (and not inherited) via declaredExtensions() call on the type


We are not seeing this in the extensions API call. In Boaz’s example if we call MyType3.extensions() it shows MyType3’s annotations and some from being an entity type but does not show the annotation from MyType1.

In our scenario MyType1 is a non-entity type and MyType3 is an entity type.


If you have a code example you can provide we will file the bug.


@rileysiebel Here is an example of the problem that @brett.thompson and I are seeing:

We can see that StageInpatientHeader does not mixin the hisType annotation that exists on InpatientHeader



I have filed this bug. For now, you might have to traverse the hierarchy yourself…


FYI in the java typesystem we confirmed the annotation from the mixin is correctly inherited.