'facing issue while annotating below are both classes and Hbm.xml mentioned have tried different method but receiving exception
**
Below are both the class Conversion below Hbm.xml file with annotation facing issue while annotating have tried different method but receiving exception
**
public class Parent {
private Set<Childaction>childactions=new HashSet<>();
}
public class Childaction extends parent {
private Parent main;
}
<hibernate-mapping>
<set name="childactions" table = "child table" cascade="save-update">
<key column="ID1"foreign-key="Foreignkey1"/>
<many-to-many column="Execute_id" unique="true" class="Childaction"/>
</set>
<subclass name="Childaction" extends="Parent" discriminator-value="not null">
<join table="childtable" inverse="true" optional="true">
<key column="Execute_id" foreign-key="foreignkey2"/>
<many-to-one name="main" column="ID1"not-null="true"/>
</join>
</subclass>
<filter name="main"/>
</class>
</hibernate-mapping>
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
