Hi,
Pardon me for reposting this question. I was not really clear in my first post.
Following is my Transaction.hbn.xml:
Code:
<hibernate-mapping auto-import="true" default-lazy="true">
<class
name="TransactionVO"
table="cdhc.TRANSACTION"
>
<id
name="transaction_id"
type="java.lang.String"
column="transaction_id"
>
<generator class="sequence">
<param name="sequence">CDHC.TRANSACTION_ID_SEQ</param>
</generator>
</id>
<property
name="vendor_id"
type="java.lang.String"
column="vendor_id"
not-null="true"
length="50"
/>
<one-to-one
name="mq_transaction"
class="MQ_TransactionVO"
cascade="save-update"
/>
</class>
</hibernate-mapping>
Following is my MQ_Transaction.hbn.xml:
Code:
<hibernate-mapping auto-import="true" default-lazy="false">
<class
name="MQ_TransactionVO"
table="cdhc.MQ_TRANSACTION"
>
<id
name="mq_transaction_id"
type="java.lang.String"
column="transaction_id"
>
</id>
<property
name="vendor_id"
type="java.lang.String"
column="vendor_id"
not-null="false"
length="24"
/>
<one-to-one
name="transaction"
class="TransactionVO"
/>
</class>
</hibernate-mapping>
What I want is for the MQ_Transaction table to have the same PK that the Transaction table has, without explicitly setting it. The Transaction table has a Primary Key generated because I am using a sequence generator. But what about MQ_Transaction? What property should I use for the MQ_Transaction table, so that it can have the same Primary Key that the Transaction table had?
Thanks for your help.
-MP