When saving on the child object (many-to-one-side), the parent key (fk) is being dropped. Can someone tell me why? This doesn't seem right. And, I think my xdoclet mappings are fine. I can load the data prior to the test and I can obtain the children perfectly from the parent side.
But, when I modify and save the child, the parent-key is removed and made null.
Code:
/**
* @hibernate.bag table="account_detail" cascade="save-update" lazy="false"
* @hibernate.key column="account_id"
* @hibernate.one-to-many class="org.dlw.model.AccountDetail"
*/
public List getAccountDetails() {
return accountDetails;
}
Code:
/**
* @hibernate.many-to-one class="org.dlw.model.Account" column="account_id"
*/
public Account getAccount() {
return account;
}