first, i HAVE read chapter 6 & 8
trying to have a collection of classes that implement the same interface, stored in a parent object (one-many)
possible?
i'm using the table per-class hierachy strategy, which seems logical, and works if i try to persist any of the concreate classes individually.. but if i try to save the parent, with a polymorphic collection, it doesn't work.
here's a snipet from the parent mapping file:
<set name="permissions" cascade="all">
<key column="profileid"/>
<one-to-many class="gov.ProfilePermission"/>
</set>
where ProfilePermsision is an interface.
this seems like a pretty common thing to do, but haven't found an example on the forum here, is this not possible?
thanks
G
|