Hello,
I am trying to reference a joined table via map-key field. The mapping of my map is below. The class PartyPreference uses a simple <join> tag into another table. I would like to reference a column off the join for my map key. Currently im using a formula to suggest the column name. Problem with this is that I am assuming the table alias will remain. In certain situtuations it changes. Is there a standard way of doing this?
Code:
<map name="cmPartyPreferences" inverse="true" fetch="join" table="DM_PartyPreference" >
<key column="party_id" />
<map-key formula="cmpartypre0_1_.name" type="java.lang.String" />
<one-to-many class="PartyPreference" />
</map>
Thanks,
LT