I have an unidirectional parent->child relationship where Project (parent) holds a reference to an array of Crafts (child, Craft[]). I would like to have xdoclet 1.2 generate the mapping for me. But if I annotate Project.java with
/**
* @hibernate.array
* cascade="all-delete-orphan"
* @hibernate.collection-index
* column="craft_position"
* @hibernate.collection-key
* column="project_id"
* @hibernate.collection-one-to-many
* class="manplan.j2ee.model.Craft"
*/
public Craft[] getCrafts()
it will give me
<array
name="crafts"
inverse="false"
cascade="all-delete-orphan"
>
<key
column="project_id"
/>
<index
column="craft_position"
/>
<one-to-many
class="manplan.j2ee.model.Craft"
/>
</array>
which is wrong since the <array> tag does not accept the "inverse" attribute. Hibernate will consequently fail upon reading this mapping. Is there a way of getting around this problem?
Thanks,
Olaf
|