RecurringOrder order = recurringTrader.createRecurringOrder(trader.getMandator(), customer, orderIDPrefix, currency);
if (segmentTypeIDs != null)
createSegments(pm, trader, order, segmentTypeIDs);
{
OrderID orderID = (OrderID) JDOHelper.getObjectId(order);
pm.evictAll();
order = (RecurringOrder) pm.getObjectById(orderID);
}
pm.getFetchPlan().setMaxFetchDepth(maxFetchDepth);