Hello
I am having the following declaration in Limited.hbm.xml
Code:
<subclass name="Limited"
extends="CorporateBO"
discriminator-value="LTD">
....
<bag name="directors" cascade="all" lazy="false">
<key column="CORPORATE_ID" not-null="true"/>
<one-to-many class="Director"/>
</bag>
</subclass>
and i am using the class Limited as follows
Code:
public class Limited extends CorporateBO{
....
List directors = new ArrayList();
public Limited(){
}
...
public List getDirectors() {
return directors;
}
public void setDirectors(List directors) {
this.directors = directors;
}
}
then i am using a Jframe to set the values at Limited and a Jframe to get the values for directors like this
Code:
if(bussiness instanceof Limited) {
.....
Vector data = directorModel.getDataVector();
((Limited)bussiness).setDirectors(data);
}
Everything works fine when i am doing insert or update but when i am removing a row from jtable then directors do not removed from table DIRECTORS as i have
cascade="all".
Am i doing something wrong?