Unwrapping nested entries of varying types

Hi. I have a content type with a reference (many) field. The items can be of varying content type. Unwrapping works if the items are all of the same content type and I specify that class in the List items field of the parent class. But how can I make it work with items of different content types?
If that is not supported directly, is there a way to utilize the transformation code (TransformQuery maybe) if I traverse the CDAEntry and fields myself?

Thanks
Christian Guldner

I found the answer. In the parent class’ annotation, I can add the necessary types in ‘additionalModelHints’:
@TransformQuery.ContentfulEntryModel(value = "guide", additionalModelHints = {PageLayout1.class, PageLayout2.class})

Not a lot of activity in this forum.

1 Like