Cascading "@Any" relationships

Viewed 175

I have a column in an entity defined like this:

@Any(metaColumn=@Column(name="index_type"),fetch=FetchType.EAGER,optional=false)
@AnyMetaDef(idType="java.util.UUID", metaType="string", metaValues={
    @MetaValue(targetEntity=LocalPodcast.class, value="Local"),
    @MetaValue(targetEntity=RSSPodcast.class, value="RSS")
})
@JoinColumn(name="index_id",columnDefinition="CHAR(36)")
private PodcastIndex index;

When I attempt to persist values of this entity type, the associated index is not persisted. I would like this to happen automatically. With other relationships, I've usually used cascade=CascadeType.ALL in the annotation defining the relationship, but there isn't a cascade field in the @Any annotation. How can I make this relationship automatically cascade? I'm using Hibernate 5.

1 Answers
Related