Hi. I am new to Hibernate, and am trying to map extra columns in a join table to the parent class. I could find an example at
http://docs.jboss.org/hibernate/core/3. ... nents.html<class name="eg.Order" .... >
....
<set name="purchasedItems" table="purchase_items" lazy="true">
<key column="order_id">
<composite-element class="eg.Purchase">
<property name="purchaseDate"/>
<property name="price"/>
<property name="quantity"/>
<many-to-one name="item" class="eg.Item"/> <!-- class attribute is optional -->
</composite-element>
</set>
</class>
I would like to see the above xml example in pure annotation. Any help will be greatly appreciated.
Thanks