Hello,
I am using Hibernate with JPA via Annotations. My Entities have an inherance strategy. So B extends A.
Then I have a class C which holds a List of As.
Code:
@OneToMany(cascade = CascadeType.ALL)
private List<A> as= new ArrayList<A>();
If I want to persist my C with a List of As (where also Bs can be placed) via
Code:
getJpaTemplate().persist(C);
the cascade mechanism works, but it only saves As.
I read in the Hibernate Docu about PolymorphismType? But as it seems it is only for reading entities.
Is there something for writting entities to get rid of my problem?
Thanks in advance