The QuoteRequest mapping is
Code:
<hibernate-mapping>
<class name="com.lab.model.quote.QuoteRequest" table="quote_requests">
<id name="id">
<generator class="sequence">
<param name="sequence">quote_requests_id_seq</param>
</generator>
</id>
<many-to-one name="customer" column="cust_id" outer-join="true" not-null="true" update="false"/>
<property name="product" column="product_type" update="false"/>
<property name="benefit" column="benefit_type" update="false"/>
<property name="waiver" column="waiver_basis" update="false"/>
<property name="sumAssured" column="sum_assured" update="false"/>
<property name="term" update="false"/>
<property name="rates" update="false"/>
<property name="indexLinked" type="boolean" column="index_linked" update="false"/>
<property name="specialOffer" type="boolean" column="special_offer" update="false"/>
<component name="error" class="com.lab.common.QuoteError">
<property name="code" column="error_code"/>
<property name="message" column="error"/>
</component>
<many-to-one name="selectedQuote" column="selected_quote_id" class="com.lab.model.quote.Quote" cascade="delete" outer-join="true"/>
</class>
</hibernate-mapping>
The CallingListItem mapping is
Code:
<class name="com.lab.model.CallingListItem" table="quote_requests" polymorphism="explicit">
<id name="id" column="id">
<generator class="assigned"/>
</id>
<many-to-one name="customer" class="com.lab.model.customer.CustomerListItem" column="cust_id"/>
<property name="lastStatusChangeTime" type="timestamp" column="last_status_change_time"/>
<property name="lastStatusCheckTime" type="timestamp" column="last_status_check_time"/>
<many-to-one name="quote" class="com.lab.model.quote.Quote" column="selected_quote_id"/>
</class>
and the mapping for Quote is
Code:
<class name="com.lab.model.quote.Quote" table="quotes">
<cache usage="nonstrict-read-write"/>
<id name="id">
<generator class="sequence">
<param name="sequence">quotes_id_seq</param>
</generator>
</id>
<many-to-one name="quoteRequest" class="com.lab.model.quote.QuoteRequest" column="request_id" not-null="true" />
<many-to-one name="provider" column="provider_id" not-null="true" update="false"/>
<property name="premium" update="false"/>
<property name="rates" update="false"/>
<property name="sumAssured" column="sum_assured" update="false"/>
<property name="commissionPcRetained" column="commission_pc_retained" update="false"/>
<property name="realCommission" column="real_commission" update="false"/>
<property name="approxCommission" column="approx_commission" update="false"/>
<property name="note" column="notes" update="false"/>
<property name="error" column="errors" update="false"/>
</class>