Hi,
I think you have to modify both sides of the relationship (if it is bidirectional):
E.g in your strategy 2:
public double update2 (int recId, int fundId, int investorId, double saving) {
|
| Investor investor =new Investor( investorId);
| Fund fund = new Fund( fundId);
| TimeRecord rec =
| em.find(Fund.class,
| Integer.valueOf(fundId));
|
| rec.setSaving( saving);
| saving.setTimeRecord (rec);
| rec.setFund( fund );
| fund.setTimeRecord (rec);
| rec.setInvestor( investor );
| investor.setTimeRecord (rec);
| em.merge (rec);
|
| return result;
| }
|
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3982318#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...