ItEr60S04ValidacionEProbasFuncionaisItEr59S04: After saving load the order from the DB.

This allows the avoiding of lots of dontPoseAsTransientAnymore.
This commit is contained in:
Óscar González Fernández 2010-06-15 20:25:16 +02:00
parent c3fc7664c2
commit ded85c356d

View file

@ -473,9 +473,23 @@ public class OrderModel implements IOrderModel {
}
});
order.dontPoseAsTransientObjectAnymore();
// this way we don't have dontPoseAsTransient all children of the
// order
initEditAfterSave();
}
}
private void initEditAfterSave() {
transactionService
.runOnReadOnlyTransaction(new IOnTransaction<Void>() {
@Override
public Void execute() {
initEdit(order);
return null;
}
});
}
private void saveOnTransaction(boolean newOrderVersionNeeded) {
reattachCriterions();
reattachTasksForTasksSources();