You can have your mappings in the following way.
Code:
<class name="us.tx.state.oag.WfPersonnelAction.HbmWfPaPersonnelActionTable" table="info_wf_action">
<composite-id>
<key-many-to-one name="BatchId" column="batch_id" class="YourJoinTableMappingClass"/>
<key-property name="ActionId" column="action_id" type="big_decimal"/>
</composite-id>
<many-to-one name="ActionTypeId"
column="action_type_id"
cascade="all-delete-orphan"
class="us.tx.state.oag.WfPersonnelAction.HbmWfPaCodeActionTypeTable"/>
<property name="CreatedWho" column="cr_who" type="string" update="true" insert="true"/>
<property name="CreatedWhen" column="cr_when" type="timestamp" update="true" insert="true"/>
<property name="UpdatedWho" column="up_who" type="string" update="true" insert="true"/>
<property name="UpdatedWhen" column="up_when" type="timestamp" update="true" insert="true"/>
</class>
Code:
<class name="us.tx.state.oag.WfPersonnelAction.HbmWfPaPersonnelActionTable" table="info_wf_action">
<composite-id>
<key-property name="BatchId" column="batch_id" type="big_decimal"/>
<key-property name="ActionId" column="action_id" type="big_decimal"/>
</composite-id>
<many-to-one name="BatchIdObject"
column="batch_id"
cascade="all"
update="false"
insert="false"
class="us.tx.state.oag.WfPersonnelAction.HbmWfPaActionBatchTable"/>
<many-to-one name="ActionTypeId"
column="action_type_id"
cascade="all"
update="false"
insert="false"
class="us.tx.state.oag.WfPersonnelAction.HbmWfPaCodeActionTypeTable"/>
<property name="CreatedWho" column="cr_who" type="string" update="true" insert="true"/>
<property name="CreatedWhen" column="cr_when" type="timestamp" update="true" insert="true"/>
<property name="UpdatedWho" column="up_who" type="string" update="true" insert="true"/>
<property name="UpdatedWhen" column="up_when" type="timestamp" update="true" insert="true"/>
</class>
With the second mapping I removed key-many-to-one in composite-id and replaced it with key-property element. Also I have many-to-one element with insert="false" and update="false"
You can use either of <key-property> and <key-many-to-one> in your mappings. When you specify <key-many-to-one> you also need to specify the mapping class to which there is a relation defined. But if you want to get rid of <key-many-to-one> and use only <key-property> then the relation between the tables can be defined using <many-to-one> element using insert="false" and update="false" attributes. See this link for more information.
http://www.hibernate.org/117.html#A34