Hibernate version: 3.0.5, Hibernate Annotations: 3.0 beta2 preview
Hi,
I'm trying to map a many-to-many collection using a set of components. In an xml mapping document, this would look as follows:
Code:
<set name="items" table="category_items">
<key column="category_id"/>
<composite-element class="CategorizedItem">
<parent name="category"/>
<many-to-one name="item" class="Item" column="item_id" not-null="true"/>
<property name="dateAdded" column="date_added" not-null="true"/>
</composite-element>
</set>
However, I'm using annotations and wonder whether the same is possible. I can only find how to map a single component, not how to map a set of components for a many-to-many relation.
Regards,
Ronald Wildenberg.