Hi,
I'm saving a List/Set to a table, and each element's index in the List is also being saved. The indexes start at 0, but I'd like them to start at 1.
What's the best way to do this?
Thank you in advance for any advice.
Sincerely,
grimholtz
Here's my (shortened) hbm.xml:
Code:
<hibernate-mapping package="com.test.foo">
<class name="QuickQuoteBean" table="quick_quote">
<id name="quoteID" column="quick_quote_id">
<generator class="increment"/>
</id>
<property name="quoteName" column="quick_quote_name"/>
<list name="buildings" table="quick_quote_building">
<key column="quick_quote_id"/>
<index column="bldg_nmbr"/>
<composite-element class="BuildingBean">
<property name="zipCode"/>
<property name="yearBuilt"/>
</composite-element>
</list>
</class>
</hibernate-mapping>