Hi,
I have been mapping a legacy data structure using Hibernate (latest version) and I came across a possible limitation that I'm looking for a simple workaround for.
I would like to use multiple <index> tags within the <list> structure to order related records by more then one field.
Like this:
Code:
<list name="CommercialUsage" lazy="true">
<key column="CommercialID"/>
<index column="UsageDate"/>
<index column="UsageTime"/>
<one-to-many class="CommercialUsage"/>
</list>
(I can not change the database to use a Timestamp field and I have more of these that have nothing todo with date/time).
I know that its possible to create a special collator/comparator but I want to avoid that if possible.
Best regards,
-Stefan