When we load the child with a many-to-one and ther is a <many-to-one on the parent, like this:
INVOICE_LINE -> INVOICE -> SELLER_PARTNERSHIP
The "SellerPartnership" is not loading and it is causing us problems. We are on Beta 6.
Any ideas?
Here is a quote from the user:
"when I try to load invoice alone, It is loading sellerPartnershipImpl successfully. But when try to invoiceLine, Invoice is loading without sellerPartnershipImpl."
Invoice.hbm.xml
Code:
<hibernate-mapping>
<class name="com.notiva.cbo.buyer.data.invoice.InvoiceImpl" table="INVOICE">
<id column="INVOICE_ID" name="id" type="java.lang.Long" unsaved-value="null">
<generator class="com.notiva.util.hibernate.SequenceIntervalGenerator">
<param name="sequence">SEQ_INVOICE_ID</param>
<param name="interval">1</param>
</generator>
</id>
<many-to-one column="SELLER_PARTNERSHIP_ID" name="partnership" not-null="true" class="com.notiva.cbo.buyer.data.partnership.SellerPartnershipImpl"/>
<set name="invoiceLines" cascade="all" lazy="true">
<key column="INVOICE_ID"/>
<one-to-many class="com.notiva.cbo.buyer.data.invoice.InvoiceLineImpl"/>
</set>
</class>
</hibernate-mapping>
InvoiceLine.hbm.xml Code:
<hibernate-mapping>
<class name="com.notiva.cbo.buyer.data.invoice.InvoiceLineImpl" table="INVOICE_LINE">
<id column="INVOICE_LINE_ID" name="id" type="java.lang.Long" unsaved-value="null">
<generator class="com.notiva.util.hibernate.SequenceIntervalGenerator">
<param name="sequence">SEQ_INVOICE_LINE_ID</param>
<param name="interval">1</param>
</generator>
</id>
<many-to-one column="INVOICE_ID" name="invoice" not-null="true" class="com.notiva.cbo.buyer.data.invoice.InvoiceImpl"/>
</class>
</hibernate-mapping>
SellerPartnership.hbm.xml Code:
<hibernate-mapping>
<class name="com.notiva.cbo.buyer.data.partnership.SellerPartnershipImpl" table="SELLER_PARTNERSHIP_SETUP">
<id column="SELLER_PARTNERSHIP_ID" name="id" type="java.lang.Long" unsaved-value="null">
<generator class="com.notiva.util.hibernate.SequenceIntervalGenerator">
<param name="sequence">SEQ_SELLER_PARTNERSHIP_ID</param>
<param name="interval">1</param>
</generator>
</id>
<many-to-one name="buyer" cascade="all" class="com.notiva.cbo.buyer.data.partnership.BuyerImpl"
column="BUYER_ID" not-null="true"/>
<property column="SELLER_COLLAB_UID_TXT" name="sellerUid" type="java.lang.String"/>
<!-- property column="SETTING_SCOPE_ID" name="shortName" type="java.lang.Integer"/ -->
<!-- Abstract Company -->
<property column="SHORT_NAME_TXT" name="shortName" type="java.lang.String"/>
<property column="LONG_NAME_TXT" name="longName" type="java.lang.String"/>
<property column="COMPANY_CODE_TXT" name="companyCode" type="java.lang.String"/>
<!-- Auditable -->
<property column="CREATE_TS" name="createTs" type="timestamp"/>
<property column="CREATE_USER_TXT" name="createUserTxt" type="java.lang.String"/>
<property column="UPDATE_TS" name="updateTs" type="timestamp"/>
<property column="UPDATE_USER_TXT" name="updateUserTxt" type="java.lang.String"/>
<!-- EFECTIVITY -->
<property column="EFF_START_DT" name="effectiveStartDate" type="timestamp"/>
<property column="EFF_END_DT" name="effectiveEndDate" type="timestamp"/>
</class>
</hibernate-mapping>