I'm trying to map a legacy system that uses triggers to generate the primary key. I know that to be able to retreive the primary key I have to use the select generator and assign to it a unique value property. This is similar to the one shown below.
Code:
<id name="id" type="long" column="id">
<generator class="select">
<param name="key">someUniqueValueProperty</param>
</generator>
</id>
However, the table i'm trying to map doesn't have any unique value property. Its uniqueness is determined by the combination of all its columns.
Is there a way to tell hibernate to load the id using multiple properties instead of just a single unique property? Or is there any other way around this problem?
Thanks in advance!