I've been trying to retrieve the metadata value of extended entity of KeywordModel on DXA 2.0.3 with no luck.
My component is called kennisitem with the following schema:
Kennisitem has a metadata field called regeling. Regeling (CGH - Regeling) is a category that's created this way:
And this is the properties of one of regeling keywords.
As you can see, this keyword has Thema Metadata as metadata schema selected. The schema itself is pretty simple:
This schema contains a field called kleurvoorpagina that points to other category which is called Opmaak, and this contains keywords that I can select when assigning property of regeling.
In Java, I made an entity model class of Kennisitem component
@Data
@EqualsAndHashCode(callSuper = true)
@SemanticEntity("Kennisitem")
public class Kennisitem extends AbstractEntityModel {
private List<Regeling> regeling;
}
and Regeling is a model class extending KeywordModel
@EqualsAndHashCode(callSuper = true)
@Data
@SemanticEntity("Regeling")
public class Regeling extends KeywordModel {
@SemanticProperty("kleurvoorpagina")
private String kleurvoorpagina;
}
The list of Regeling is populated, but the value of kleurvoorpagina is always null. What am I missing here? Both Regeling and Kennisitem are registered in module initializer.
Note: I tried to debug KeywordConverter@convert from dxa-tridion-provider and I can see that the metadata is in KeywordWrapper variable. However my kleurvoorpagina field is not populated.