Hi,
I have a problem persisting a composit of my super class when persisting data with the subclass instance. Both my parent class and the composit reside in one schema. My sublass a different schema. When i save the subclass (+ parent without composit (comments) ) it saves without a hitch but when i add the composit. Hibernate cannot find the sequence generator for the composit.
Thanks in advance for the assitence.
Subclass hbm file:
Code:
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping schema="core" default-access="field" default-lazy="false">
<class name="za.co.fnb.card.sharedkernel.domain.cases.Case" schema="core" table="case">
<id name="id" type="long">
<generator class="sequence">
<param name="sequence">seq_case_id</param>
</generator>
</id>
<version generated="never" name="version" type="integer"/>
<property name="createdDate" type="timestamp">
<column name="created_date" not-null="true"/>
</property>
<property name="createdByChannel" column="created_by_channel" type="string"/>
<property name="createdByRef" column="created_by_ref" type="string"/>
<property name="className" type="string">
<column name="class_name" not-null="true"/>
</property>
<property name="customerId" type="long">
<column name="customer_id"/>
</property>
<property lazy="false" name="company">
<column name="company" not-null="true"/>
<type name="org.hibernate.type.EnumType">
<param name="type">12</param>
<param name="enumClass">za.co.fnb.card.sharedkernel.domain.Company</param>
</type>
</property>
<property name="status" type="string">
<column name="status"/>
</property>
<set cascade="all" fetch="join" name="statusHistory" sort="natural" order-by="created_date desc">
<key foreign-key="fk_case_status">
<column name="case_id"/>
</key>
<one-to-many class="za.co.fnb.card.sharedkernel.domain.cases.CaseStatus"/>
</set>
<bag name="supportingDocuments" cascade="all" lazy="false">
<key foreign-key="fk_case_supporting_document">
<column name="case_id"/>
</key>
<one-to-many class="za.co.fnb.card.sharedkernel.domain.cases.SupportingDocument" />
</bag>
<set cascade="all" fetch="join" name="contactHistory" sort="natural" order-by="contacted_date desc">
<key foreign-key="fk_case_contact">
<column name="case_id"/>
</key>
<one-to-many class="za.co.fnb.card.sharedkernel.domain.cases.Contact"/>
</set>
<set cascade="all" lazy="false" name="reminders" sort="unsorted">
<key foreign-key="fk_case_reminder">
<column name="case_id"/>
</key>
<one-to-many class="za.co.fnb.card.sharedkernel.domain.cases.Reminder"/>
</set>
<set cascade="all" lazy="false" name="comments" sort="natural" order-by="created_date desc">
<key foreign-key="fk_case_comment">
<column name="case_id"/>
</key>
<one-to-many class="za.co.fnb.card.sharedkernel.domain.cases.Comment"/>
</set>
<joined-subclass name="za.co.fnb.card.sharedkernel.domain.cases.AdhocCase" schema="core" table="adhoc_case">
<key column="case_id"/>
<set cascade="all,delete-orphan" lazy="false" name="tasks" sort="natural" order-by="created_date desc">
<key foreign-key="fk_case_task">
<column name="case_id"/>
</key>
<one-to-many class="za.co.fnb.card.sharedkernel.domain.Task"/>
</set>
<joined-subclass name="za.co.fnb.card.delivery.domain.cases.DeliveryCase" table="delivery.delivery_case">
<key column="case_id"/>
<property name="plasticId" type="long">
<column name="plastic_id" not-null="true" />
</property>
<property name="brand">
<column name="brand" />
<type name="org.hibernate.type.EnumType">
<param name="type">12</param>
<param name="enumClass">za.co.fnb.card.sharedkernel.domain.banking.Brand</param>
</type>
</property>
</joined-subclass>
</joined-subclass>
</class>
</hibernate-mapping>
Problems arise when i add comment.