I have 2 classes Town -*---------1-> Country
Code:
public class Town extends BaseObject implements Serializable {
protected String name;
protected Country country;
/**
* @hibernate.many-to-one
* column="FK_COUNTRY_ID"
* class="org.appfuse.model.Country"
* cascade="delete"
*/
public Country getCountry() {
return country;
}
// other getters and setters
}
and
Code:
public class Country extends BaseObject implements Serializable {
protected String code;
protected String name;
// getters and setters
}
When I delete any Town it is cascaded to Country - what I need is to be it cascaded inversly - to not generate unconsitency but remove unconsitency.
Inverse tag doesn exists in relationship many-to-one :(
Thanks in advance.[/b]