Contentful logo

Contentful Community

Unwrap CDAAsset in Java SDK using the Delivery API

I have CDAAssets linked from the “testEntity” which I would like to unwrap into my own class with the same ease as with CDAEntities. I was hoping it worked as below but it fails to unwrap and comes as a CDAAsset instead which I want to avoid.

Did I miss something or isn’t it supported ?

@ContentfulEntryModel("testEntity")
public class TestEntity {
    @ContentfulField
    String id;

    @ContentfulField
    List<ContentfulImage> images;
}

public class ContentfulImage {
    @ContentfulField
    String title;

    @ContentfulField
    String description;
}
1 Like