You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by do...@apache.org on 2012/05/29 06:13:07 UTC

svn commit: r1343485 [1/3] - in /ofbiz/trunk/applications/order: src/org/ofbiz/order/order/ src/org/ofbiz/order/requirement/ src/org/ofbiz/order/shoppingcart/ src/org/ofbiz/order/shoppingcart/product/ src/org/ofbiz/order/shoppinglist/ src/org/ofbiz/ord...

Author: doogie
Date: Tue May 29 04:13:04 2012
New Revision: 1343485

URL: http://svn.apache.org/viewvc?rev=1343485&view=rev
Log:
DEPRECATION: applications/order: getRelatedOne variants replaced with a getRelatedOne variant that takes a boolean useCache parameter.

Modified:
    ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderChangeHelper.java
    ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderEvents.java
    ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReadHelper.java
    ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReturnServices.java
    ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java
    ofbiz/trunk/applications/order/src/org/ofbiz/order/requirement/RequirementServices.java
    ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutEvents.java
    ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutHelper.java
    ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java
    ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartItem.java
    ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartServices.java
    ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/product/ProductDisplayWorker.java
    ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/product/ProductPromoWorker.java
    ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppinglist/ShoppingListServices.java
    ofbiz/trunk/applications/order/src/org/ofbiz/order/thirdparty/paypal/ExpressCheckoutEvents.java
    ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/AdditionalPartyListing.groovy
    ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/BillSettings.groovy
    ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/CheckoutReview.groovy
    ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/CheckoutShippingAddress.groovy
    ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/SetAdditionalParty.groovy
    ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/ShipSettings.groovy
    ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/CompareProducts.groovy
    ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/InlineProductDetail.groovy
    ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/Product.groovy
    ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/ProductDetail.groovy
    ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/ProductSummary.groovy
    ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/ProductUomDropDownOnly.groovy
    ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/CompanyHeader.groovy
    ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/OrderView.groovy
    ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/ShipGroups.groovy
    ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/quote/GetPartyAddress.groovy
    ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/return/QuickReturn.groovy
    ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/return/ReturnHeader.groovy
    ofbiz/trunk/applications/order/webapp/ordermgr/entry/SplitShip.ftl
    ofbiz/trunk/applications/order/webapp/ordermgr/entry/addrsettings.ftl
    ofbiz/trunk/applications/order/webapp/ordermgr/entry/billsettings.ftl
    ofbiz/trunk/applications/order/webapp/ordermgr/entry/cart/promotioncategories.ftl
    ofbiz/trunk/applications/order/webapp/ordermgr/entry/cart/showcartitems.ftl
    ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/keywordsearchbox.ftl
    ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/productdetail.ftl
    ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/quickadd.ftl
    ofbiz/trunk/applications/order/webapp/ordermgr/entry/checkoutoptions.ftl
    ofbiz/trunk/applications/order/webapp/ordermgr/entry/checkoutshippingaddress.ftl
    ofbiz/trunk/applications/order/webapp/ordermgr/entry/order/orderheaderinfo.ftl
    ofbiz/trunk/applications/order/webapp/ordermgr/entry/order/orderitems.ftl
    ofbiz/trunk/applications/order/webapp/ordermgr/entry/order/shipGroupConfirmSummary.ftl
    ofbiz/trunk/applications/order/webapp/ordermgr/entry/orderterms.ftl
    ofbiz/trunk/applications/order/webapp/ordermgr/entry/shipsettings.ftl
    ofbiz/trunk/applications/order/webapp/ordermgr/order/OrderListByDate.ftl
    ofbiz/trunk/applications/order/webapp/ordermgr/order/OrderSalesReps.ftl
    ofbiz/trunk/applications/order/webapp/ordermgr/order/editorderitems.ftl
    ofbiz/trunk/applications/order/webapp/ordermgr/order/findOrders.ftl
    ofbiz/trunk/applications/order/webapp/ordermgr/order/orderReportBody.fo.ftl
    ofbiz/trunk/applications/order/webapp/ordermgr/order/orderReportConditions.fo.ftl
    ofbiz/trunk/applications/order/webapp/ordermgr/order/orderReportContactMechs.fo.ftl
    ofbiz/trunk/applications/order/webapp/ordermgr/order/orderReportHeaderInfo.fo.ftl
    ofbiz/trunk/applications/order/webapp/ordermgr/order/ordercontactinfo.ftl
    ofbiz/trunk/applications/order/webapp/ordermgr/order/orderinfo.ftl
    ofbiz/trunk/applications/order/webapp/ordermgr/order/orderitems.ftl
    ofbiz/trunk/applications/order/webapp/ordermgr/order/orderlist.ftl
    ofbiz/trunk/applications/order/webapp/ordermgr/order/orderpaymentinfo.ftl
    ofbiz/trunk/applications/order/webapp/ordermgr/order/ordershippinginfo.ftl
    ofbiz/trunk/applications/order/webapp/ordermgr/order/orderterms.ftl
    ofbiz/trunk/applications/order/webapp/ordermgr/quote/ViewQuoteItemInfo.ftl
    ofbiz/trunk/applications/order/webapp/ordermgr/quote/quoteReportBody.fo.ftl
    ofbiz/trunk/applications/order/webapp/ordermgr/quote/quoteRoles.ftl
    ofbiz/trunk/applications/order/webapp/ordermgr/request/ViewRequestItemInfo.ftl
    ofbiz/trunk/applications/order/webapp/ordermgr/request/requestContactMech.ftl
    ofbiz/trunk/applications/order/webapp/ordermgr/return/quickReturn.ftl
    ofbiz/trunk/applications/order/webapp/ordermgr/return/returnHeader.ftl
    ofbiz/trunk/applications/order/webapp/ordermgr/return/returnItemInc.ftl
    ofbiz/trunk/applications/order/webapp/ordermgr/return/returnItems.ftl
    ofbiz/trunk/applications/order/webapp/ordermgr/return/returnList.ftl
    ofbiz/trunk/applications/order/webapp/ordermgr/return/returnReportBody.fo.ftl
    ofbiz/trunk/applications/order/webapp/ordermgr/task/ordertasklist.ftl
    ofbiz/trunk/applications/order/widget/ordermgr/ReturnForms.xml

Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderChangeHelper.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderChangeHelper.java?rev=1343485&r1=1343484&r2=1343485&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderChangeHelper.java (original)
+++ ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderChangeHelper.java Tue May 29 04:13:04 2012
@@ -189,14 +189,14 @@ public class OrderChangeHelper {
                         GenericValue product = null;
 
                         try {
-                            product = orderItem.getRelatedOne("Product");
+                            product = orderItem.getRelatedOne("Product", false);
                         } catch (GenericEntityException e) {
                             Debug.logError(e, "ERROR: Unable to get Product record for OrderItem : " + orderId + "/" + orderItemSeqId, module);
                         }
                         if (product != null) {
                             GenericValue productType = null;
                             try {
-                                productType = product.getRelatedOne("ProductType");
+                                productType = product.getRelatedOne("ProductType", false);
                             } catch (GenericEntityException e) {
                                 Debug.logError(e, "ERROR: Unable to get ProductType from Product : " + product, module);
                             }

Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderEvents.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderEvents.java?rev=1343485&r1=1343484&r2=1343485&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderEvents.java (original)
+++ ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderEvents.java Tue May 29 04:13:04 2012
@@ -113,7 +113,7 @@ public class OrderEvents {
                     GenericValue orderItem = delegator.findOne("OrderItem", UtilMisc.toMap("orderId", orderId, "orderItemSeqId", orderItemSeqId), false);
                     List<GenericValue> orderItemShipGroupAssocs = orderItem.getRelated("OrderItemShipGroupAssoc");
                     for (GenericValue orderItemShipGroupAssoc : orderItemShipGroupAssocs) {
-                        GenericValue orderItemShipGroup = orderItemShipGroupAssoc.getRelatedOne("OrderItemShipGroup");
+                        GenericValue orderItemShipGroup = orderItemShipGroupAssoc.getRelatedOne("OrderItemShipGroup", false);
                         String shipGroupSeqId = orderItemShipGroup.getString("shipGroupSeqId");
 
                         Map<String, Object> contextMap = FastMap.newInstance();

Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReadHelper.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReadHelper.java?rev=1343485&r1=1343484&r2=1343485&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReadHelper.java (original)
+++ ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReadHelper.java Tue May 29 04:13:04 2012
@@ -103,7 +103,7 @@ public class OrderReadHelper {
         } else if (this.orderHeader == null && orderItems != null) {
             GenericValue firstItem = EntityUtil.getFirst(orderItems);
             try {
-                this.orderHeader = firstItem.getRelatedOne("OrderHeader");
+                this.orderHeader = firstItem.getRelatedOne("OrderHeader", false);
             } catch (GenericEntityException e) {
                 Debug.logError(e, module);
                 this.orderHeader = null;
@@ -346,10 +346,10 @@ public class OrderReadHelper {
                     UtilMisc.toMap("orderId", orderHeader.getString("orderId"), "shipGroupSeqId", shipGroupSeqId), false);
 
             if (shipGroup != null) {
-                GenericValue carrierShipmentMethod = shipGroup.getRelatedOne("CarrierShipmentMethod");
+                GenericValue carrierShipmentMethod = shipGroup.getRelatedOne("CarrierShipmentMethod", false);
 
                 if (carrierShipmentMethod != null) {
-                    GenericValue shipmentMethodType = carrierShipmentMethod.getRelatedOne("ShipmentMethodType");
+                    GenericValue shipmentMethodType = carrierShipmentMethod.getRelatedOne("ShipmentMethodType", false);
 
                     if (shipmentMethodType != null) {
                         return UtilFormatOut.checkNull(shipGroup.getString("carrierPartyId")) + " " +
@@ -370,10 +370,10 @@ public class OrderReadHelper {
                     UtilMisc.toMap("orderId", orderHeader.getString("orderId"), "shipGroupSeqId", shipGroupSeqId), false);
 
             if (shipGroup != null) {
-                GenericValue carrierShipmentMethod = shipGroup.getRelatedOne("CarrierShipmentMethod");
+                GenericValue carrierShipmentMethod = shipGroup.getRelatedOne("CarrierShipmentMethod", false);
 
                 if (carrierShipmentMethod != null) {
-                    GenericValue shipmentMethodType = carrierShipmentMethod.getRelatedOne("ShipmentMethodType");
+                    GenericValue shipmentMethodType = carrierShipmentMethod.getRelatedOne("ShipmentMethodType", false);
 
                     if (shipmentMethodType != null) {
                         return UtilFormatOut.checkNull(shipmentMethodType.getString("shipmentMethodTypeId")) + "@" + UtilFormatOut.checkNull(shipGroup.getString("carrierPartyId"));
@@ -396,9 +396,9 @@ public class OrderReadHelper {
 
     public boolean hasPhysicalProductItems() throws GenericEntityException {
         for(GenericValue orderItem : this.getOrderItems()) {
-            GenericValue product = orderItem.getRelatedOneCache("Product");
+            GenericValue product = orderItem.getRelatedOne("Product", true);
             if (product != null) {
-                GenericValue productType = product.getRelatedOneCache("ProductType");
+                GenericValue productType = product.getRelatedOne("ProductType", true);
                 if ("Y".equals(productType.getString("isPhysical"))) {
                     return true;
                 }
@@ -453,7 +453,7 @@ public class OrderReadHelper {
                     UtilMisc.toMap("orderId", orderHeader.getString("orderId"), "shipGroupSeqId", shipGroupSeqId), false);
 
             if (shipGroup != null) {
-                return shipGroup.getRelatedOne("PostalAddress");
+                return shipGroup.getRelatedOne("PostalAddress", false);
 
             }
         } catch (GenericEntityException e) {
@@ -469,10 +469,10 @@ public class OrderReadHelper {
             GenericValue orderContactMech = EntityUtil.getFirst(orderHeader.getRelatedByAnd("OrderContactMech", UtilMisc.toMap("contactMechPurposeTypeId", "SHIPPING_LOCATION")));
 
             if (orderContactMech != null) {
-                GenericValue contactMech = orderContactMech.getRelatedOne("ContactMech");
+                GenericValue contactMech = orderContactMech.getRelatedOne("ContactMech", false);
 
                 if (contactMech != null) {
-                    return contactMech.getRelatedOne("PostalAddress");
+                    return contactMech.getRelatedOne("PostalAddress", false);
                 }
             }
         } catch (GenericEntityException e) {
@@ -510,10 +510,10 @@ public class OrderReadHelper {
             GenericValue orderContactMech = EntityUtil.getFirst(orderHeader.getRelatedByAnd("OrderContactMech", UtilMisc.toMap("contactMechPurposeTypeId", "BILLING_LOCATION")));
 
             if (orderContactMech != null) {
-                GenericValue contactMech = orderContactMech.getRelatedOne("ContactMech");
+                GenericValue contactMech = orderContactMech.getRelatedOne("ContactMech", false);
 
                 if (contactMech != null) {
-                    billingAddress = contactMech.getRelatedOne("PostalAddress");
+                    billingAddress = contactMech.getRelatedOne("PostalAddress", false);
                 }
             }
         } catch (GenericEntityException e) {
@@ -525,7 +525,7 @@ public class OrderReadHelper {
             GenericValue billingAccount = getBillingAccount();
             if (billingAccount != null) {
                 try {
-                    billingAddress = billingAccount.getRelatedOne("PostalAddress");
+                    billingAddress = billingAccount.getRelatedOne("PostalAddress", false);
                 } catch (GenericEntityException e) {
                     Debug.logWarning(e, module);
                 }
@@ -534,15 +534,15 @@ public class OrderReadHelper {
                 GenericValue paymentPreference = EntityUtil.getFirst(getPaymentPreferences());
                 if (paymentPreference != null) {
                     try {
-                        GenericValue paymentMethod = paymentPreference.getRelatedOne("PaymentMethod");
+                        GenericValue paymentMethod = paymentPreference.getRelatedOne("PaymentMethod", false);
                         if (paymentMethod != null) {
-                            GenericValue creditCard = paymentMethod.getRelatedOne("CreditCard");
+                            GenericValue creditCard = paymentMethod.getRelatedOne("CreditCard", false);
                             if (creditCard != null) {
-                                billingAddress = creditCard.getRelatedOne("PostalAddress");
+                                billingAddress = creditCard.getRelatedOne("PostalAddress", false);
                             } else {
-                                GenericValue eftAccount = paymentMethod.getRelatedOne("EftAccount");
+                                GenericValue eftAccount = paymentMethod.getRelatedOne("EftAccount", false);
                                 if (eftAccount != null) {
-                                    billingAddress = eftAccount.getRelatedOne("PostalAddress");
+                                    billingAddress = eftAccount.getRelatedOne("PostalAddress", false);
                                 }
                             }
                         }
@@ -593,7 +593,7 @@ public class OrderReadHelper {
     public String getCurrentStatusString() {
         GenericValue statusItem = null;
         try {
-            statusItem = orderHeader.getRelatedOneCache("StatusItem");
+            statusItem = orderHeader.getRelatedOne("StatusItem", true);
         } catch (GenericEntityException e) {
             Debug.logError(e, module);
         }
@@ -616,7 +616,7 @@ public class OrderReadHelper {
             boolean isCurrent = true;
             while (orderStatusIter.hasNext()) {
                 GenericValue orderStatus = orderStatusIter.next();
-                GenericValue statusItem = orderStatus.getRelatedOneCache("StatusItem");
+                GenericValue statusItem = orderStatus.getRelatedOne("StatusItem", true);
 
                 if (statusItem != null) {
                     orderStatusString.append(statusItem.get("description", locale));
@@ -647,7 +647,7 @@ public class OrderReadHelper {
     public GenericValue getBillingAccount() {
         GenericValue billingAccount = null;
         try {
-            billingAccount = orderHeader.getRelatedOne("BillingAccount");
+            billingAccount = orderHeader.getRelatedOne("BillingAccount", false);
         } catch (GenericEntityException e) {
             Debug.logError(e, module);
         }
@@ -874,7 +874,7 @@ public class OrderReadHelper {
             for(GenericValue item : validItems) {
                 GenericValue product = null;
                 try {
-                    product = item.getRelatedOne("Product");
+                    product = item.getRelatedOne("Product", false);
                 } catch (GenericEntityException e) {
                     Debug.logError(e, "Problem getting Product from OrderItem; returning 0", module);
                 }
@@ -896,7 +896,7 @@ public class OrderReadHelper {
             for(GenericValue item : validItems) {
                 GenericValue product = null;
                 try {
-                    product = item.getRelatedOne("Product");
+                    product = item.getRelatedOne("Product", false);
                 } catch (GenericEntityException e) {
                     Debug.logError(e, "Problem getting Product from OrderItem; returning 0", module);
                 }
@@ -918,7 +918,7 @@ public class OrderReadHelper {
             for(GenericValue item : validItems) {
                 GenericValue product = null;
                 try {
-                    product = item.getRelatedOne("Product");
+                    product = item.getRelatedOne("Product", false);
                 } catch (GenericEntityException e) {
                     Debug.logError(e, "Problem getting Product from OrderItem; returning 0", module);
                     return ZERO;
@@ -951,7 +951,7 @@ public class OrderReadHelper {
             for(GenericValue item : validItems) {
                 GenericValue product = null;
                 try {
-                    product = item.getRelatedOne("Product");
+                    product = item.getRelatedOne("Product", false);
                 } catch (GenericEntityException e) {
                     Debug.logError(e, "Problem getting Product from OrderItem; returning 0", module);
                     return ZERO;
@@ -984,7 +984,7 @@ public class OrderReadHelper {
 
         GenericValue product = null;
         try {
-            product = item.getRelatedOne("Product");
+            product = item.getRelatedOne("Product", false);
         } catch (GenericEntityException e) {
             Debug.logError(e, "Problem getting Product from OrderItem; returning 0", module);
             return BigDecimal.ZERO;
@@ -1098,7 +1098,7 @@ public class OrderReadHelper {
 
         GenericValue product = null;
         try {
-            product = item.getRelatedOne("Product");
+            product = item.getRelatedOne("Product", false);
         } catch (GenericEntityException e) {
             Debug.logError(e, "Problem getting Product from OrderItem", module);
             return BigDecimal.ZERO;
@@ -1147,7 +1147,7 @@ public class OrderReadHelper {
 
         GenericValue product = null;
         try {
-            product = item.getRelatedOne("Product");
+            product = item.getRelatedOne("Product", false);
         } catch (GenericEntityException e) {
             Debug.logError(e, "Problem getting Product from OrderItem; returning 1", module);
             return 1;
@@ -1168,7 +1168,7 @@ public class OrderReadHelper {
                     }
                     if (virtual != null) {
                         try {
-                            GenericValue virtualProduct = virtual.getRelatedOne("MainProduct");
+                            GenericValue virtualProduct = virtual.getRelatedOne("MainProduct", false);
                             pieces = virtualProduct.getLong("piecesIncluded");
                         } catch (GenericEntityException e) {
                             Debug.logError(e, "Problem getting virtual product");
@@ -1224,7 +1224,7 @@ public class OrderReadHelper {
         if (orderContactMechs != null) {
             for(GenericValue orderContactMech : orderContactMechs) {
                 try {
-                    GenericValue contactMech = orderContactMech.getRelatedOne("ContactMech");
+                    GenericValue contactMech = orderContactMech.getRelatedOne("ContactMech", false);
                     emails.append(emails.length() > 0 ? "," : "").append(contactMech.getString("infoString"));
                 } catch (GenericEntityException e) {
                     Debug.logWarning(e, "Problems getting contact mech from order contact mech", module);
@@ -1476,14 +1476,14 @@ public class OrderReadHelper {
             if (item.get("productId") != null) {
                 GenericValue product = null;
                 try {
-                    product = item.getRelatedOne("Product");
+                    product = item.getRelatedOne("Product", false);
                 } catch (GenericEntityException e) {
                     Debug.logError(e, "Unable to get Product from OrderItem", module);
                 }
                 if (product != null) {
                     GenericValue productType = null;
                     try {
-                        productType = product.getRelatedOne("ProductType");
+                        productType = product.getRelatedOne("ProductType", false);
                     } catch (GenericEntityException e) {
                         Debug.logError(e, "ERROR: Unable to get ProductType from Product", module);
                     }
@@ -1552,7 +1552,7 @@ public class OrderReadHelper {
             List<GenericValue> workOrderItemFulFillments = delegator.findByAnd("WorkOrderItemFulfillment", UtilMisc.toMap("orderId", orderId, "orderItemSeqId", orderItemSeqId), null, true);
             if (!UtilValidate.isEmpty(workOrderItemFulFillments)) {
                 workOrderItemFulFillment = EntityUtil.getFirst(workOrderItemFulFillments);
-                workEffort = workOrderItemFulFillment.getRelatedOne("WorkEffort");
+                workEffort = workOrderItemFulFillment.getRelatedOne("WorkEffort", false);
             }
         } catch (GenericEntityException e) {
             return null;
@@ -1567,7 +1567,7 @@ public class OrderReadHelper {
     public String getCurrentItemStatus(GenericValue orderItem) {
         GenericValue statusItem = null;
         try {
-            statusItem = orderItem.getRelatedOne("StatusItem");
+            statusItem = orderItem.getRelatedOne("StatusItem", false);
         } catch (GenericEntityException e) {
             Debug.logError(e, "Trouble getting StatusItem : " + orderItem, module);
         }
@@ -1884,7 +1884,7 @@ public class OrderReadHelper {
         // sum up the return items that have a return item response with a billing account defined
         try {
             for(GenericValue returnItem : returnedItems) {
-                GenericValue returnItemResponse = returnItem.getRelatedOne("ReturnItemResponse");
+                GenericValue returnItemResponse = returnItem.getRelatedOne("ReturnItemResponse", false);
                 if (returnItemResponse == null) continue;
                 if (returnItemResponse.get("billingAccountId") == null) continue;
 
@@ -2096,7 +2096,7 @@ public class OrderReadHelper {
     public String getAdjustmentType(GenericValue adjustment) {
         GenericValue adjustmentType = null;
         try {
-            adjustmentType = adjustment.getRelatedOne("OrderAdjustmentType");
+            adjustmentType = adjustment.getRelatedOne("OrderAdjustmentType", false);
         } catch (GenericEntityException e) {
             Debug.logError(e, "Problems with order adjustment", module);
         }
@@ -2114,7 +2114,7 @@ public class OrderReadHelper {
     public String getCurrentItemStatusString(GenericValue orderItem) {
         GenericValue statusItem = null;
         try {
-            statusItem = orderItem.getRelatedOneCache("StatusItem");
+            statusItem = orderItem.getRelatedOne("StatusItem", true);
         } catch (GenericEntityException e) {
             Debug.logError(e, module);
         }
@@ -2408,7 +2408,7 @@ public class OrderReadHelper {
                         GenericValue WorkOrderItemFulfillment = iter.next();
                         GenericValue workEffort = null;
                         try {
-                            workEffort = WorkOrderItemFulfillment.getRelatedOneCache("WorkEffort");
+                            workEffort = WorkOrderItemFulfillment.getRelatedOne("WorkEffort", true);
                         } catch (GenericEntityException e) {}
                         result = result.multiply(getWorkEffortRentalQuantity(workEffort));
                     }

Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReturnServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReturnServices.java?rev=1343485&r1=1343484&r2=1343485&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReturnServices.java (original)
+++ ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReturnServices.java Tue May 29 04:13:04 2012
@@ -170,7 +170,7 @@ public class OrderReturnServices {
                     GenericValue issue = EntityUtil.getFirst(itemIssue);
                     GenericValue inventoryItem = null;
                     try {
-                        inventoryItem = issue.getRelatedOne("InventoryItem");
+                        inventoryItem = issue.getRelatedOne("InventoryItem", false);
                     } catch (GenericEntityException e) {
                         Debug.logError(e, module);
                         throw new GeneralRuntimeException(e.getMessage());
@@ -230,7 +230,7 @@ public class OrderReturnServices {
             GenericValue firstItem = EntityUtil.getFirst(returnItems);
             GenericValue orderHeader = null;
             try {
-                orderHeader = firstItem.getRelatedOne("OrderHeader");
+                orderHeader = firstItem.getRelatedOne("OrderHeader", false);
             } catch (GenericEntityException e) {
                 Debug.logError(e, module);
                 return ServiceUtil.returnError(UtilProperties.getMessage(resource_error,
@@ -356,7 +356,7 @@ public class OrderReturnServices {
                                 EntityCondition.makeCondition("returnId", EntityOperator.EQUALS, returnId), EntityOperator.AND,
                                 EntityCondition.makeCondition("returnTypeId", EntityOperator.EQUALS, "RTN_WAIT_REPLACE_RES")), null, UtilMisc.toList("createdStamp"), null, false);
                         for (GenericValue returnItem : returnItems) {
-                            GenericValue returnItemResponse = returnItem.getRelatedOne("ReturnItemResponse");
+                            GenericValue returnItemResponse = returnItem.getRelatedOne("ReturnItemResponse", false);
                             if (returnItemResponse != null) {
                                 String replacementOrderId = returnItemResponse.getString("replacementOrderId");
                                 Map<String, Object> svcCtx = UtilMisc.<String, Object>toMap("orderId", replacementOrderId, "userLogin", userLogin);
@@ -385,7 +385,7 @@ public class OrderReturnServices {
         Locale locale = (Locale) context.get("locale");
         if (orderItem.get("productId") != null) {
             try {
-                product = orderItem.getRelatedOne("Product");
+                product = orderItem.getRelatedOne("Product", false);
             } catch (GenericEntityException e) {
                 Debug.logError(e, "ERROR: Unable to get Product from OrderItem", module);
             }
@@ -432,7 +432,7 @@ public class OrderReturnServices {
                 for(GenericValue returnItem : returnedItems) {
                     GenericValue returnHeader = null;
                     try {
-                        returnHeader = returnItem.getRelatedOne("ReturnHeader");
+                        returnHeader = returnItem.getRelatedOne("ReturnHeader", false);
                     } catch (GenericEntityException e) {
                         Debug.logError(e, module);
                         return ServiceUtil.returnError(UtilProperties.getMessage(resource_error,
@@ -499,7 +499,7 @@ public class OrderReturnServices {
                 for(GenericValue orderItemQuantityIssued : orderItemQuantitiesIssued) {
                     GenericValue item = null;
                     try {
-                        item = orderItemQuantityIssued.getRelatedOne("OrderItem");
+                        item = orderItemQuantityIssued.getRelatedOne("OrderItem", false);
                     } catch (GenericEntityException e) {
                         Debug.logError(e, module);
                         return ServiceUtil.returnError(UtilProperties.getMessage(resource_error,
@@ -511,7 +511,7 @@ public class OrderReturnServices {
                         BigDecimal quantityIssued = orderItemQuantityIssued.getBigDecimal("quantityIssued");
                         if (UtilValidate.isEmpty(quantityIssued) || quantityIssued.compareTo(BigDecimal.ZERO) == 0) {
                             try {
-                                GenericValue itemProduct = item.getRelatedOne("Product");
+                                GenericValue itemProduct = item.getRelatedOne("Product", false);
                                 if (ProductWorker.isPhysical(itemProduct)) {
                                     continue;
                                 }
@@ -548,7 +548,7 @@ public class OrderReturnServices {
                         GenericValue product = null;
                         if (item.get("productId") != null) {
                             try {
-                                product = item.getRelatedOne("Product");
+                                product = item.getRelatedOne("Product", false);
                             } catch (GenericEntityException e) {
                                 Debug.logError(e, module);
                                 return ServiceUtil.returnError(UtilProperties.getMessage(resource_error,
@@ -642,7 +642,7 @@ public class OrderReturnServices {
                         // considered completed after the return is accepted
                         if ("RETURN_ACCEPTED".equals(returnHeader.getString("statusId"))) {
                             try {
-                                GenericValue itemProduct = item.getRelatedOne("Product");
+                                GenericValue itemProduct = item.getRelatedOne("Product", false);
                                 if (!ProductWorker.isPhysical(itemProduct)) {
                                     completedItems.add(item);
                                 }
@@ -743,7 +743,7 @@ public class OrderReturnServices {
             }
             if (UtilValidate.isNotEmpty(returnItem)) {
                 try {
-                    orderHeader = returnItem.getRelatedOne("OrderHeader");
+                    orderHeader = returnItem.getRelatedOne("OrderHeader", false);
                 } catch (GenericEntityException e) {
                     return ServiceUtil.returnError(e.getMessage());
                 }
@@ -1154,7 +1154,7 @@ public class OrderReturnServices {
                 GenericValue returnHeader = null;
                 try {
                     returnItem = EntityUtil.getFirst(returnItemResponse.getRelated("ReturnItem"));
-                    returnHeader = returnItem.getRelatedOne("ReturnHeader");
+                    returnHeader = returnItem.getRelatedOne("ReturnHeader", false);
                 } catch (GenericEntityException e) {
                     Debug.logError("Problem getting ReturnItem", module);
                     return ServiceUtil.returnError(e.getMessage());
@@ -1274,7 +1274,7 @@ public class OrderReturnServices {
 
                     if (UtilValidate.isNotEmpty(orgAcctgPref)) {
                         try {
-                            orgAcctgPref.getRelatedOne("PaymentMethod");
+                            orgAcctgPref.getRelatedOne("PaymentMethod", false);
                         } catch (GenericEntityException e) {
                             Debug.logError("Error retrieving related refundPaymentMethod from PartyAcctgPreference for partyId " + productStore.get("payToPartyId"), module);
                         }
@@ -1522,7 +1522,7 @@ public class OrderReturnServices {
 
         GenericValue orderHeader = null;
         try {
-            orderHeader = paymentPref.getRelatedOne("OrderHeader");
+            orderHeader = paymentPref.getRelatedOne("OrderHeader", false);
         } catch (GenericEntityException e) {
             Debug.logError(e, "Cannot get OrderHeader from OrderPaymentPreference", module);
             return ServiceUtil.returnError(UtilProperties.getMessage(resource, 
@@ -1632,7 +1632,7 @@ public class OrderReturnServices {
             for (GenericValue item : items) {
                 List<GenericValue> billings = item.getRelated("ReturnItemBilling");
                 for (GenericValue billing : billings) {
-                    GenericValue invoice = billing.getRelatedOne("Invoice");
+                    GenericValue invoice = billing.getRelatedOne("Invoice", false);
 
                     // put the invoice in the map if it doesn't already exist (a very loopy way of doing group by invoiceId without creating a view)
                     if (returnInvoices.get(invoice.getString("invoiceId")) == null) {
@@ -1668,7 +1668,7 @@ public class OrderReturnServices {
                     input.put("amountApplied", amountApplied);
                     input.put("userLogin", userLogin);
                     if (response.get("billingAccountId") != null) {
-                        GenericValue billingAccount = response.getRelatedOne("BillingAccount");
+                        GenericValue billingAccount = response.getRelatedOne("BillingAccount", false);
                         if (billingAccount != null) {
                             input.put("billingAccountId", response.get("billingAccountId"));
                         }
@@ -1808,8 +1808,8 @@ public class OrderReturnServices {
                         GenericValue orderItem = null;
                         GenericValue product = null;
                         try {
-                            orderItem = returnItem.getRelatedOne("OrderItem");
-                            product = orderItem.getRelatedOne("Product");
+                            orderItem = returnItem.getRelatedOne("OrderItem", false);
+                            product = orderItem.getRelatedOne("Product", false);
                         } catch (GenericEntityException e) {
                             Debug.logError(e, module);
                             continue;
@@ -1827,7 +1827,7 @@ public class OrderReturnServices {
                                         if (UtilValidate.isNotEmpty(product)) {
                                             GenericValue refurbItemAssoc = EntityUtil.getFirst(EntityUtil.filterByDate(product.getRelated("MainProductAssoc", UtilMisc.toMap("productAssocTypeId", "PRODUCT_REFURB"), UtilMisc.toList("sequenceNum"))));
                                             if (UtilValidate.isNotEmpty(refurbItemAssoc)) {
-                                                refurbItem = refurbItemAssoc.getRelatedOne("AssocProduct");
+                                                refurbItem = refurbItemAssoc.getRelatedOne("AssocProduct", false);
                                             }
                                         }
                                     } catch (GenericEntityException e) {
@@ -1885,7 +1885,7 @@ public class OrderReturnServices {
                                     orderItemShipGroupAssoc = EntityUtil.getFirst(orderItem.getRelated("OrderItemShipGroupAssoc"));
                                     if (orderItemShipGroupAssoc != null) {
                                         if (!orderItemShipGroupIds.contains(orderItemShipGroupAssoc.getString("shipGroupSeqId"))) {
-                                            GenericValue orderItemShipGroup = orderItemShipGroupAssoc.getRelatedOne("OrderItemShipGroup");
+                                            GenericValue orderItemShipGroup = orderItemShipGroupAssoc.getRelatedOne("OrderItemShipGroup", false);
                                             GenericValue newOrderItemShipGroup = (GenericValue)orderItemShipGroup.clone();
                                             newOrderItemShipGroup.set("orderId", null);
                                             orderItemShipGroupInfo.add(newOrderItemShipGroup);
@@ -1918,7 +1918,7 @@ public class OrderReturnServices {
                                         for(GenericValue repairItem : repairItems) {
                                             GenericValue repairItemProduct = null;
                                             try {
-                                                repairItemProduct = repairItem.getRelatedOne("AssocProduct");
+                                                repairItemProduct = repairItem.getRelatedOne("AssocProduct", false);
                                             } catch (GenericEntityException e) {
                                                 Debug.logError(e, module);
                                                 continue;
@@ -2021,7 +2021,7 @@ public class OrderReturnServices {
                 if ((additionalItemTotal.compareTo(BigDecimal.ZERO) > 0) || ("RTN_CSREPLACE".equals(returnTypeId) && orderPriceTotal.compareTo(ZERO) > 0)) {
                     GenericValue paymentMethod = null;
                     try {
-                        paymentMethod = returnHeader.getRelatedOne("PaymentMethod");
+                        paymentMethod = returnHeader.getRelatedOne("PaymentMethod", false);
                     } catch (GenericEntityException e) {
                         Debug.logError(e, module);
                     }
@@ -2314,10 +2314,10 @@ public class OrderReturnServices {
             for(GenericValue returnItem : returnItems) {
                 String orderId = returnItem.getString("orderId");
                 try {
-                    GenericValue returnItemResponse = returnItem.getRelatedOne("ReturnItemResponse");
+                    GenericValue returnItemResponse = returnItem.getRelatedOne("ReturnItemResponse", false);
                     if ((returnItemResponse != null) && (orderId != null)) {
                         // TODO should we filter on payment's status (PMNT_SENT,PMNT_RECEIVED)
-                        GenericValue payment = returnItemResponse.getRelatedOne("Payment");
+                        GenericValue payment = returnItemResponse.getRelatedOne("Payment", false);
                         if ((payment != null) && (payment.getBigDecimal("amount") != null) &&
                                 !paymentList.contains(payment.get("paymentId"))) {
                             UtilMisc.addToBigDecimalInMap(returnAmountByOrder, orderId, payment.getBigDecimal("amount"));
@@ -2407,7 +2407,7 @@ public class OrderReturnServices {
                 String returnHeaderTypeId = ((returnHeader != null) && (returnHeader.getString("returnHeaderTypeId") != null)) ? returnHeader.getString("returnHeaderTypeId") : "CUSTOMER_RETURN";
                 returnItemTypeMap = delegator.findOne("ReturnItemTypeMap",
                         UtilMisc.toMap("returnHeaderTypeId", returnHeaderTypeId, "returnItemMapKey", orderAdjustment.get("orderAdjustmentTypeId")), false);
-                returnAdjustmentType = returnItemTypeMap.getRelatedOne("ReturnAdjustmentType");
+                returnAdjustmentType = returnItemTypeMap.getRelatedOne("ReturnAdjustmentType", false);
                 if (returnAdjustmentType != null && UtilValidate.isEmpty(description)) {
                     description = returnAdjustmentType.getString("description");
                 }
@@ -2415,7 +2415,7 @@ public class OrderReturnServices {
                     returnItem = delegator.findOne("ReturnItem",
                             UtilMisc.toMap("returnId", returnId, "returnItemSeqId", returnItemSeqId), false);
                     Debug.logInfo("returnId:" + returnId + ",returnItemSeqId:" + returnItemSeqId, module);
-                    orderItem = returnItem.getRelatedOne("OrderItem");
+                    orderItem = returnItem.getRelatedOne("OrderItem", false);
                 } else {
                     // we don't have the returnItemSeqId but before we consider this
                     // an header adjustment we try to get a return item in this return
@@ -2427,7 +2427,7 @@ public class OrderReturnServices {
                                                                                             "orderId", orderAdjustment.getString("orderId"),
                                                                                             "orderItemSeqId", orderAdjustment.getString("orderItemSeqId")), null, false));
                         if (UtilValidate.isNotEmpty(returnItem)) {
-                            orderItem = returnItem.getRelatedOne("OrderItem");
+                            orderItem = returnItem.getRelatedOne("OrderItem", false);
                         }
                     }
                 }

Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java?rev=1343485&r1=1343484&r2=1343485&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java (original)
+++ ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java Tue May 29 04:13:04 2012
@@ -152,7 +152,7 @@ public class OrderServices {
                     // check sales agent/customer relationship
                     List<GenericValue> repsCustomers = new LinkedList<GenericValue>();
                     try {
-                        repsCustomers = EntityUtil.filterByDate(userLogin.getRelatedOne("Party").getRelatedByAnd("FromPartyRelationship", UtilMisc.toMap("roleTypeIdFrom", "AGENT", "roleTypeIdTo", "CUSTOMER", "partyIdTo", partyId)));
+                        repsCustomers = EntityUtil.filterByDate(userLogin.getRelatedOne("Party", false).getRelatedByAnd("FromPartyRelationship", UtilMisc.toMap("roleTypeIdFrom", "AGENT", "roleTypeIdTo", "CUSTOMER", "partyIdTo", partyId)));
                     } catch (GenericEntityException ex) {
                         Debug.logError("Could not determine if " + partyId + " is a customer of user " + userLogin.getString("userLoginId") + " due to " + ex.getMessage(), module);
                     }
@@ -162,7 +162,7 @@ public class OrderServices {
                     if (!hasPermission) {
                         // check sales sales rep/customer relationship
                         try {
-                            repsCustomers = EntityUtil.filterByDate(userLogin.getRelatedOne("Party").getRelatedByAnd("FromPartyRelationship", UtilMisc.toMap("roleTypeIdFrom", "SALES_REP", "roleTypeIdTo", "CUSTOMER", "partyIdTo", partyId)));
+                            repsCustomers = EntityUtil.filterByDate(userLogin.getRelatedOne("Party", false).getRelatedByAnd("FromPartyRelationship", UtilMisc.toMap("roleTypeIdFrom", "SALES_REP", "roleTypeIdTo", "CUSTOMER", "partyIdTo", partyId)));
                         } catch (GenericEntityException ex) {
                             Debug.logError("Could not determine if " + partyId + " is a customer of user " + userLogin.getString("userLoginId") + " due to " + ex.getMessage(), module);
                         }
@@ -684,7 +684,7 @@ public class OrderServices {
                 // see if this fixed asset has a calendar, when no create one and attach to fixed asset
                 Debug.logInfo("find the techdatacalendar",module);
                 GenericValue techDataCalendar = null;
-                try { techDataCalendar = fixedAsset.getRelatedOne("TechDataCalendar");
+                try { techDataCalendar = fixedAsset.getRelatedOne("TechDataCalendar", false);
                 }
                 catch (GenericEntityException e) {
                     Debug.logInfo("TechData calendar does not exist yet so create for fixedAsset: " + fixedAsset.get("fixedAssetId") ,module);
@@ -1075,7 +1075,7 @@ public class OrderServices {
             if (UtilValidate.isNotEmpty(orderItems)) {
                 for (GenericValue orderItem: orderItems) {
                     String productId = (String) orderItem.get("productId");
-                    GenericValue product = delegator.getRelatedOne("Product", orderItem);
+                    GenericValue product = delegator.getRelatedOne("Product", orderItem, false);
                     
                     if (product != null && ("SERVICE_PRODUCT".equals(product.get("productTypeId")) || "AGGREGATEDSERV_CONF".equals(product.get("productTypeId")))) {
                         String inventoryFacilityId = null;
@@ -1181,7 +1181,7 @@ public class OrderServices {
                         continue;
                     }
                     GenericValue orderItem = itemValuesBySeqId.get(orderItemShipGroupAssoc.get("orderItemSeqId"));
-                    GenericValue orderItemShipGroup = orderItemShipGroupAssoc.getRelatedOne("OrderItemShipGroup");
+                    GenericValue orderItemShipGroup = orderItemShipGroupAssoc.getRelatedOne("OrderItemShipGroup", false);
                     String shipGroupFacilityId = orderItemShipGroup.getString("facilityId");
                     String itemStatus = orderItem.getString("statusId");
                     if ("ITEM_REJECTED".equals(itemStatus) || "ITEM_CANCELLED".equals(itemStatus) || "ITEM_COMPLETED".equals(itemStatus)) {
@@ -1192,7 +1192,7 @@ public class OrderServices {
                             !"RENTAL_ORDER_ITEM".equals(orderItem.getString("orderItemTypeId"))) {  // ignore for rental
                         try {
                             // get the product of the order item
-                            GenericValue product = orderItem.getRelatedOne("Product");
+                            GenericValue product = orderItem.getRelatedOne("Product", false);
                             if (product == null) {
                                 Debug.logError("Error when looking up product in reserveInventory service", module);
                                 resErrorMessages.add("Error when looking up product in reserveInventory service");
@@ -1287,7 +1287,7 @@ public class OrderServices {
                     if (UtilValidate.isNotEmpty(orderItem.getString("productId")) && "RENTAL_ORDER_ITEM".equals(orderItem.getString("orderItemTypeId"))) {
                         try {
                             // get the product of the order item
-                            GenericValue product = orderItem.getRelatedOne("Product");
+                            GenericValue product = orderItem.getRelatedOne("Product", false);
                             if (product == null) {
                                 Debug.logError("Error when looking up product in reserveInventory service", module);
                                 resErrorMessages.add("Error when looking up product in reserveInventory service");
@@ -2027,7 +2027,7 @@ public class OrderServices {
             for(GenericValue orderItemShipGroupAssoc : orderItemShipGroupAssocs) {
                 GenericValue orderItem = null;
                 try {
-                    orderItem = orderItemShipGroupAssoc.getRelatedOne("OrderItem");
+                    orderItem = orderItemShipGroupAssoc.getRelatedOne("OrderItem", false);
                 } catch (GenericEntityException e) {
                     Debug.logError(e, module);
                 }
@@ -2865,10 +2865,10 @@ public class OrderServices {
         for (int i = 0; i < purpose.length; i++) {
             try {
                 GenericValue orderContactMech = EntityUtil.getFirst(orderHeader.getRelatedByAnd("OrderContactMech", UtilMisc.toMap("contactMechPurposeTypeId", purpose[i])));
-                GenericValue contactMech = orderContactMech.getRelatedOne("ContactMech");
+                GenericValue contactMech = orderContactMech.getRelatedOne("ContactMech", false);
 
                 if (contactMech != null) {
-                    result.put(outKey[i], contactMech.getRelatedOne("PostalAddress"));
+                    result.put(outKey[i], contactMech.getRelatedOne("PostalAddress", false));
                 }
             } catch (GenericEntityException e) {
                 result.put(ModelService.RESPONSE_MESSAGE, ModelService.RESPOND_ERROR);
@@ -3019,7 +3019,7 @@ public class OrderServices {
                 // need the store for the order
                 GenericValue productStore = null;
                 try {
-                    productStore = orderHeader.getRelatedOne("ProductStore");
+                    productStore = orderHeader.getRelatedOne("ProductStore", false);
                 } catch (GenericEntityException e) {
                     Debug.logError(e, "Unable to get ProductStore from OrderHeader", module);
                 }
@@ -3134,14 +3134,14 @@ public class OrderServices {
             for(GenericValue item : orderItems) {
                 GenericValue product = null;
                 try {
-                    product = item.getRelatedOne("Product");
+                    product = item.getRelatedOne("Product", false);
                 } catch (GenericEntityException e) {
                     Debug.logError(e, "ERROR: Unable to get Product from OrderItem", module);
                 }
                 if (product != null) {
                     GenericValue productType = null;
                     try {
-                        productType = product.getRelatedOne("ProductType");
+                        productType = product.getRelatedOne("ProductType", false);
                     } catch (GenericEntityException e) {
                         Debug.logError(e, "ERROR: Unable to get ProductType from Product", module);
                     }
@@ -3214,7 +3214,7 @@ public class OrderServices {
 
                     if (product != null) {
                         try {
-                            productType = product.getRelatedOne("ProductType");
+                            productType = product.getRelatedOne("ProductType", false);
                         } catch (GenericEntityException e) {
                             Debug.logError(e, "ERROR: Unable to get ProductType from Product", module);
                         }
@@ -3292,7 +3292,7 @@ public class OrderServices {
                 GenericValue product = null;
                 List<GenericValue> productContent = null;
                 try {
-                    product = orderItem.getRelatedOne("Product");
+                    product = orderItem.getRelatedOne("Product", false);
                     if (product == null) {
                         return ServiceUtil.returnError(UtilProperties.getMessage(resource_error,
                                 "OrderErrorCannotCheckForFulfillmentProductNotFound", locale));
@@ -3327,7 +3327,7 @@ public class OrderServices {
                     for(GenericValue productContentItem : productContent) {
                         GenericValue content = null;
                         try {
-                            content = productContentItem.getRelatedOne("Content");
+                            content = productContentItem.getRelatedOne("Content", false);
                         } catch (GenericEntityException e) {
                             Debug.logError(e,"ERROR: Cannot get Content entity: " + e.getMessage(),module);
                             continue;
@@ -3403,7 +3403,7 @@ public class OrderServices {
             for(GenericValue item : orderItems) {
                 GenericValue product = null;
                 try {
-                    product = item.getRelatedOne("Product");
+                    product = item.getRelatedOne("Product", false);
                 } catch (GenericEntityException e) {
                     Debug.logError(e, "ERROR: Unable to get Product from OrderItem", module);
                 }
@@ -4427,14 +4427,14 @@ public class OrderServices {
             }
 
             // get the order header
-            GenericValue orderHeader = orderPaymentPreference.getRelatedOne("OrderHeader");
+            GenericValue orderHeader = orderPaymentPreference.getRelatedOne("OrderHeader", false);
             if (orderHeader == null) {
                 return ServiceUtil.returnError(UtilProperties.getMessage(resource,
                         "OrderOrderPaymentCannotBeCreatedWithRelatedOrderHeader", locale));
             }
 
             // get the store for the order.  It will be used to set the currency
-            GenericValue productStore = orderHeader.getRelatedOne("ProductStore");
+            GenericValue productStore = orderHeader.getRelatedOne("ProductStore", false);
             if (productStore == null) {
                 return ServiceUtil.returnError(UtilProperties.getMessage(resource,
                         "OrderOrderPaymentCannotBeCreatedWithRelatedProductStore", locale));

Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/requirement/RequirementServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/requirement/RequirementServices.java?rev=1343485&r1=1343484&r2=1343485&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/src/org/ofbiz/order/requirement/RequirementServices.java (original)
+++ ofbiz/trunk/applications/order/src/org/ofbiz/order/requirement/RequirementServices.java Tue May 29 04:13:04 2012
@@ -209,7 +209,7 @@ public class RequirementServices {
         String orderId = (String) context.get("orderId");
         try {
             GenericValue order = delegator.findOne("OrderHeader", UtilMisc.toMap("orderId", orderId), false);
-            GenericValue productStore = order.getRelatedOneCache("ProductStore");
+            GenericValue productStore = order.getRelatedOne("ProductStore", true);
             if (productStore == null) {
                 Debug.logInfo("ProductStore for order ID " + orderId + " not found, requirements not created", module);
                 return ServiceUtil.returnSuccess();
@@ -217,7 +217,7 @@ public class RequirementServices {
             String facilityId = productStore.getString("inventoryFacilityId");
             List<GenericValue> orderItems = order.getRelated("OrderItem");
             for(GenericValue item : orderItems) {
-                GenericValue product = item.getRelatedOne("Product");
+                GenericValue product = item.getRelatedOne("Product", false);
                 if (product == null) continue;
                 if ((!"PRODRQM_AUTO".equals(product.get("requirementMethodEnumId")) &&
                         !"PRODRQM_AUTO".equals(productStore.get("requirementMethodEnumId"))) ||
@@ -268,7 +268,7 @@ public class RequirementServices {
         String orderId = (String) context.get("orderId");
         try {
             GenericValue order = delegator.findOne("OrderHeader", UtilMisc.toMap("orderId", orderId), false);
-            GenericValue productStore = order.getRelatedOneCache("ProductStore");
+            GenericValue productStore = order.getRelatedOne("ProductStore", true);
             if (productStore == null) {
                 Debug.logInfo("ProductStore for order ID " + orderId + " not found, ATP requirements not created", module);
                 return ServiceUtil.returnSuccess();
@@ -276,7 +276,7 @@ public class RequirementServices {
             String facilityId = productStore.getString("inventoryFacilityId");
             List<GenericValue> orderItems = order.getRelated("OrderItem");
             for(GenericValue item : orderItems) {
-                GenericValue product = item.getRelatedOne("Product");
+                GenericValue product = item.getRelatedOne("Product", false);
                 if (product == null) continue;
 
                 if (!("PRODRQM_ATP".equals(product.get("requirementMethodEnumId")) ||

Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutEvents.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutEvents.java?rev=1343485&r1=1343484&r2=1343485&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutEvents.java (original)
+++ ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutEvents.java Tue May 29 04:13:04 2012
@@ -655,7 +655,7 @@ public class CheckOutEvents {
                 payPalProdStorePaySettings = delegator.findByAnd("ProductStorePaymentSetting", UtilMisc.toMap("productStoreId", productStore.getString("productStoreId"), "paymentMethodTypeId", "EXT_PAYPAL"), null, false);
                 GenericValue payPalProdStorePaySetting = EntityUtil.getFirst(payPalProdStorePaySettings);
                 if (payPalProdStorePaySetting != null) {
-                    GenericValue gatewayConfig = payPalProdStorePaySetting.getRelatedOne("PaymentGatewayConfig");
+                    GenericValue gatewayConfig = payPalProdStorePaySetting.getRelatedOne("PaymentGatewayConfig", false);
                     if (gatewayConfig != null && "PAYFLOWPRO".equals(gatewayConfig.getString("paymentGatewayConfigTypeId"))) {
                         return "paypal";
                     }

Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutHelper.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutHelper.java?rev=1343485&r1=1343484&r2=1343485&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutHelper.java (original)
+++ ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutHelper.java Tue May 29 04:13:04 2012
@@ -1207,9 +1207,9 @@ public class CheckOutHelper {
                 GenericValue creditCard = null;
                 GenericValue billingAddress = null;
                 try {
-                    creditCard = paymentMethod.getRelatedOne("CreditCard");
+                    creditCard = paymentMethod.getRelatedOne("CreditCard", false);
                     if (creditCard != null)
-                        billingAddress = creditCard.getRelatedOne("PostalAddress");
+                        billingAddress = creditCard.getRelatedOne("PostalAddress", false);
                 } catch (GenericEntityException e) {
                     Debug.logError(e, "Problems getting credit card from payment method", module);
                     errMsg = UtilProperties.getMessage(resource_error,"checkhelper.problems_reading_database", (cart != null ? cart.getLocale() : Locale.getDefault()));

Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java?rev=1343485&r1=1343484&r2=1343485&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java (original)
+++ ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java Tue May 29 04:13:04 2012
@@ -838,7 +838,7 @@ public class ShoppingCart implements Ite
         for(ShoppingCartItem cartItem : this.cartLines) {
             GenericValue product = cartItem.getProduct();
             try {
-                GenericValue productType = product.getRelatedOneCache("ProductType");
+                GenericValue productType = product.getRelatedOne("ProductType", true);
                 if (productType == null || !"N".equals(productType.getString("isPhysical"))) {
                     return false;
                 }
@@ -860,7 +860,7 @@ public class ShoppingCart implements Ite
         for (ShoppingCartItem cartItem: shipInfo.getShipItems()) {
             GenericValue product = cartItem.getProduct();
             try {
-                GenericValue productType = product.getRelatedOneCache("ProductType");
+                GenericValue productType = product.getRelatedOne("ProductType", true);
                 if (productType == null || !"N".equals(productType.getString("isPhysical"))) {
                     return false;
                 }
@@ -965,7 +965,7 @@ public class ShoppingCart implements Ite
         String itemGroupNumber = itemGroupValue.getString("orderItemGroupSeqId");
         ShoppingCartItemGroup itemGroup = this.getItemGroupByNumber(itemGroupNumber);
         if (itemGroup == null) {
-            ShoppingCartItemGroup parentGroup = addItemGroup(itemGroupValue.getRelatedOneCache("ParentOrderItemGroup"));
+            ShoppingCartItemGroup parentGroup = addItemGroup(itemGroupValue.getRelatedOne("ParentOrderItemGroup", true));
             itemGroup = new ShoppingCartItemGroup(itemGroupNumber, itemGroupValue.getString("groupName"), parentGroup);
             int parsedGroupNumber = Integer.parseInt(itemGroupNumber);
             if (parsedGroupNumber > this.nextGroupNumber) {
@@ -1823,7 +1823,7 @@ public class ShoppingCart implements Ite
             for(GenericValue pm : paymentMethods) {
                 if ("CREDIT_CARD".equals(pm.getString("paymentMethodTypeId"))) {
                     try {
-                        GenericValue cc = pm.getRelatedOne("CreditCard");
+                        GenericValue cc = pm.getRelatedOne("CreditCard", false);
                         creditCards.add(cc);
                     } catch (GenericEntityException e) {
                         Debug.logError(e, "Unable to get credit card record from payment method : " + pm, module);
@@ -1842,7 +1842,7 @@ public class ShoppingCart implements Ite
             for(GenericValue pm : paymentMethods) {
                 if ("GIFT_CARD".equals(pm.getString("paymentMethodTypeId"))) {
                     try {
-                        GenericValue gc = pm.getRelatedOne("GiftCard");
+                        GenericValue gc = pm.getRelatedOne("GiftCard", false);
                         giftCards.add(gc);
                     } catch (GenericEntityException e) {
                         Debug.logError(e, "Unable to get gift card record from payment method : " + pm, module);
@@ -4678,7 +4678,7 @@ public class ShoppingCart implements Ite
                         pmObj = delegator.findOne("PayPalPaymentMethod", lookupFields, false);
                     }
                     if (pmObj != null) {
-                        postalAddress = pmObj.getRelatedOne("PostalAddress");
+                        postalAddress = pmObj.getRelatedOne("PostalAddress", false);
                     } else {
                         Debug.logInfo("No PaymentMethod Object Found - " + paymentMethodId, module);
                     }

Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartItem.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartItem.java?rev=1343485&r1=1343484&r2=1343485&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartItem.java (original)
+++ ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartItem.java Tue May 29 04:13:04 2012
@@ -910,7 +910,7 @@ public class ShoppingCartItem implements
         // find the fixed asset itself
         GenericValue fixedAsset = null;
         try {
-            fixedAsset = fixedAssetProduct.getRelatedOne("FixedAsset");
+            fixedAsset = fixedAssetProduct.getRelatedOne("FixedAsset", false);
         } catch (GenericEntityException e) {
             Map<String, Object> messageMap = UtilMisc.<String, Object>toMap("fixedAssetId", fixedAssetProduct.getString("fixedAssetId"));
             String msg = UtilProperties.getMessage(resource_error, "item.fixed_Asset_not_found", messageMap , cart.getLocale());
@@ -927,7 +927,7 @@ public class ShoppingCartItem implements
         // DEJ20050725 this isn't being used anywhere, commenting out for now and not assigning from the getRelatedOne: GenericValue techDataCalendar = null;
         GenericValue techDataCalendar = null;
         try {
-            techDataCalendar = fixedAsset.getRelatedOne("TechDataCalendar");
+            techDataCalendar = fixedAsset.getRelatedOne("TechDataCalendar", false);
         } catch (GenericEntityException e) {
             Debug.logWarning(e, module);
         }

Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartServices.java?rev=1343485&r1=1343484&r2=1343485&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartServices.java (original)
+++ ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartServices.java Tue May 29 04:13:04 2012
@@ -482,7 +482,7 @@ public class ShoppingCartServices {
                 cartItem.setOrderItemSeqId(item.getString("orderItemSeqId"));
 
                 try {
-                    cartItem.setItemGroup(cart.addItemGroup(item.getRelatedOneCache("OrderItemGroup")));
+                    cartItem.setItemGroup(cart.addItemGroup(item.getRelatedOne("OrderItemGroup", true)));
                 } catch (GenericEntityException e) {
                     Debug.logError(e, module);
                     return ServiceUtil.returnError(e.getMessage());
@@ -971,7 +971,7 @@ public class ShoppingCartServices {
         // If no currency has been set in the ShoppingList, use the ProductStore default currency
         if (currency == null) {
             try {
-                GenericValue productStore = shoppingList.getRelatedOne("ProductStore");
+                GenericValue productStore = shoppingList.getRelatedOne("ProductStore", false);
                 if (productStore != null) {
                     currency = productStore.getString("defaultCurrencyUomId");
                 }

Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/product/ProductDisplayWorker.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/product/ProductDisplayWorker.java?rev=1343485&r1=1343484&r2=1343485&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/product/ProductDisplayWorker.java (original)
+++ ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/product/ProductDisplayWorker.java Tue May 29 04:13:04 2012
@@ -82,13 +82,13 @@ public class ProductDisplayWorker {
                 productsCategories = EntityUtil.filterByDate(productsCategories, true);
                 if (productsCategories != null) {
                     for(GenericValue productsCategoryMember : productsCategories) {
-                        GenericValue productsCategory = productsCategoryMember.getRelatedOneCache("ProductCategory");
+                        GenericValue productsCategory = productsCategoryMember.getRelatedOne("ProductCategory", true);
                         if ("CROSS_SELL_CATEGORY".equals(productsCategory.getString("productCategoryTypeId"))) {
                             List<GenericValue> curPcms = productsCategory.getRelatedCache("ProductCategoryMember");
                             if (curPcms != null) {
                                 for(GenericValue curPcm : curPcms) {
                                     if (!products.containsKey(curPcm.getString("productId"))) {
-                                        GenericValue product = curPcm.getRelatedOneCache("Product");
+                                        GenericValue product = curPcm.getRelatedOne("Product", true);
                                         products.put(product.getString("productId"), product);
                                     }
                                 }
@@ -100,7 +100,7 @@ public class ProductDisplayWorker {
                 if (UtilValidate.isNotEmpty(complementProducts)) {
                     for(GenericValue productAssoc : complementProducts) {
                         if (!products.containsKey(productAssoc.getString("productIdTo"))) {
-                            GenericValue product = productAssoc.getRelatedOneCache("AssocProduct");
+                            GenericValue product = productAssoc.getRelatedOne("AssocProduct", true);
                             products.put(product.getString("productId"), product);
                         }
                     }
@@ -183,7 +183,7 @@ public class ProductDisplayWorker {
                         String productId = orderItem.getString("productId");
                         if (UtilValidate.isNotEmpty(productId)) {
                             // for each order item get the associated product
-                            GenericValue product = orderItem.getRelatedOneCache("Product");
+                            GenericValue product = orderItem.getRelatedOne("Product", true);
 
                             products.put(product.getString("productId"), product);
 

Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/product/ProductPromoWorker.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/product/ProductPromoWorker.java?rev=1343485&r1=1343484&r2=1343485&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/product/ProductPromoWorker.java (original)
+++ ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/product/ProductPromoWorker.java Tue May 29 04:13:04 2012
@@ -120,7 +120,7 @@ public class ProductPromoWorker {
                         if (Debug.verboseOn()) Debug.logVerbose("Skipping promotion with id [" + productStorePromoAppl.getString("productPromoId") + "] because it is applied to the store with ID " + productStoreId + " as a manual only promotion.", module);
                         continue;
                     }
-                    GenericValue productPromo = productStorePromoAppl.getRelatedOneCache("ProductPromo");
+                    GenericValue productPromo = productStorePromoAppl.getRelatedOne("ProductPromo", true);
                     List<GenericValue> productPromoRules = productPromo.getRelatedCache("ProductPromoRule", null, null);
 
 
@@ -181,7 +181,7 @@ public class ProductPromoWorker {
                     if (Debug.verboseOn()) Debug.logVerbose("Skipping promotion with id [" + productStorePromoAppl.getString("productPromoId") + "] because it is applied to the store with ID " + productStoreId + " as a manual only promotion.", module);
                         continue;
                 }
-                GenericValue productPromo = productStorePromoAppl.getRelatedOneCache("ProductPromo");
+                GenericValue productPromo = productStorePromoAppl.getRelatedOne("ProductPromo", true);
                 Iterator<GenericValue> productPromoCodesIter = UtilMisc.toIterator(productPromo.getRelatedCache("ProductPromoCode", null, null));
                 while (productPromoCodesIter != null && productPromoCodesIter.hasNext()) {
                     GenericValue productPromoCode = productPromoCodesIter.next();
@@ -228,7 +228,7 @@ public class ProductPromoWorker {
                     if (Debug.verboseOn()) Debug.logVerbose("Skipping promotion with id [" + prodCatalogPromoAppl.getString("productPromoId") + "] because it is applied to the store with ID " + productStoreId + " as a manual only promotion.", module);
                     continue;
                 }
-                GenericValue productPromo = prodCatalogPromoAppl.getRelatedOneCache("ProductPromo");
+                GenericValue productPromo = prodCatalogPromoAppl.getRelatedOne("ProductPromo", true);
                 productPromoList.add(productPromo);
             }
         } catch (GenericEntityException e) {
@@ -277,7 +277,7 @@ public class ProductPromoWorker {
             Iterator<GenericValue> agreementPromoAppls = UtilMisc.toIterator(agreementPromoApplsList);
             while (agreementPromoAppls != null && agreementPromoAppls.hasNext()) {
                 GenericValue agreementPromoAppl = agreementPromoAppls.next();
-                GenericValue productPromo = agreementPromoAppl.getRelatedOneCache("ProductPromo");
+                GenericValue productPromo = agreementPromoAppl.getRelatedOne("ProductPromo", true);
                 productPromoList.add(productPromo);
             }
         } catch (GenericEntityException e) {
@@ -1255,7 +1255,7 @@ public class ProductPromoWorker {
     }
 
     protected static boolean checkConditionsForItem(GenericValue productPromoActionOrCond, ShoppingCart cart, ShoppingCartItem cartItem, Delegator delegator, LocalDispatcher dispatcher, Timestamp nowTimestamp) throws GenericEntityException {
-        GenericValue productPromoRule = productPromoActionOrCond.getRelatedOneCache("ProductPromoRule");
+        GenericValue productPromoRule = productPromoActionOrCond.getRelatedOne("ProductPromoRule", true);
 
         List<GenericValue> productPromoConds = delegator.findByAnd("ProductPromoCond", UtilMisc.toMap("productPromoId", productPromoRule.get("productPromoId")), UtilMisc.toList("productPromoCondSeqId"), true);
         productPromoConds = EntityUtil.filterByAnd(productPromoConds, UtilMisc.toMap("productPromoRuleId", productPromoRule.get("productPromoRuleId")));

Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppinglist/ShoppingListServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppinglist/ShoppingListServices.java?rev=1343485&r1=1343484&r2=1343485&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppinglist/ShoppingListServices.java (original)
+++ ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppinglist/ShoppingListServices.java Tue May 29 04:13:04 2012
@@ -143,7 +143,7 @@ public class ShoppingListServices {
                 while (((shoppingList = eli.next()) != null)) {
                     Timestamp lastOrder = shoppingList.getTimestamp("lastOrderedDate");
                     GenericValue recurrenceInfo = null;
-                    recurrenceInfo = shoppingList.getRelatedOne("RecurrenceInfo");
+                    recurrenceInfo = shoppingList.getRelatedOne("RecurrenceInfo", false);
 
                     Timestamp startDateTime = recurrenceInfo.getTimestamp("startDateTime");
                     RecurrenceInfo recurrence = null;

Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/thirdparty/paypal/ExpressCheckoutEvents.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/thirdparty/paypal/ExpressCheckoutEvents.java?rev=1343485&r1=1343484&r2=1343485&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/src/org/ofbiz/order/thirdparty/paypal/ExpressCheckoutEvents.java (original)
+++ ofbiz/trunk/applications/order/src/org/ofbiz/order/thirdparty/paypal/ExpressCheckoutEvents.java Tue May 29 04:13:04 2012
@@ -210,13 +210,13 @@ public class ExpressCheckoutEvents {
         GenericValue payPalPaymentSetting = ProductStoreWorker.getProductStorePaymentSetting(delegator, productStoreId, "EXT_PAYPAL", null, true);
         if (payPalPaymentSetting != null && payPalPaymentSetting.getString("paymentGatewayConfigId") != null) {
             try {
-                GenericValue paymentGatewayConfig = payPalPaymentSetting.getRelatedOne("PaymentGatewayConfig");
+                GenericValue paymentGatewayConfig = payPalPaymentSetting.getRelatedOne("PaymentGatewayConfig", false);
                 String paymentGatewayConfigTypeId = paymentGatewayConfig.getString("paymentGatewayConfigTypeId");
                 if (paymentGatewayConfig != null) {
                     if ("PAYFLOWPRO".equals(paymentGatewayConfigTypeId)) {
                         return CheckoutType.PAYFLOW;
                     } else if ("PAYPAL".equals(paymentGatewayConfigTypeId)) {
-                        GenericValue payPalConfig = paymentGatewayConfig.getRelatedOne("PaymentGatewayPayPal");
+                        GenericValue payPalConfig = paymentGatewayConfig.getRelatedOne("PaymentGatewayPayPal", false);
                         // TODO: Probably better off with an indicator field to indicate Express Checkout use
                         if (UtilValidate.isNotEmpty(payPalConfig.get("apiUserName"))) {
                             return CheckoutType.STANDARD;

Modified: ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/AdditionalPartyListing.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/AdditionalPartyListing.groovy?rev=1343485&r1=1343484&r2=1343485&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/AdditionalPartyListing.groovy (original)
+++ ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/AdditionalPartyListing.groovy Tue May 29 04:13:04 2012
@@ -36,12 +36,12 @@ additionalPartyRole.each { roleTypeId, p
         partyMap.partyId = partyId;
         party = delegator.findOne("Party", [partyId : partyId], true);
         if (party.partyTypeId.equals("PERSON")) {
-            party = party.getRelatedOneCache("Person");
+            party = party.getRelatedOne("Person", true);
             partyMap.type = "person";
             partyMap.firstName = party.firstName;
             partyMap.lastName = party.lastName;
         } else {
-            party = party.getRelatedOneCache("PartyGroup");
+            party = party.getRelatedOne("PartyGroup", true);
             partyMap.type = "group";
             partyMap.groupName = party.groupName;
         }

Modified: ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/BillSettings.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/BillSettings.groovy?rev=1343485&r1=1343484&r2=1343485&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/BillSettings.groovy (original)
+++ ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/BillSettings.groovy Tue May 29 04:13:04 2012
@@ -42,7 +42,7 @@ if (newPaymentMethodId) {
 
 if (orderPartyId && !orderPartyId.equals("_NA_")) {
     orderParty = delegator.findOne("Party", [partyId : orderPartyId], false);
-    orderPerson = orderParty.getRelatedOne("Person");
+    orderPerson = orderParty.getRelatedOne("Person", false);
     context.orderParty = orderParty;
     context.orderPerson = orderPerson;
     if (orderParty) {
@@ -72,17 +72,17 @@ if (cart) {
             paymentMethod = delegator.findOne("PaymentMethod", [paymentMethodId : checkOutPaymentId], false);
             if ("CREDIT_CARD".equals(paymentMethod?.paymentMethodTypeId)) {
                 paymentMethodType = "CC";
-                account = paymentMethod.getRelatedOne("CreditCard");
+                account = paymentMethod.getRelatedOne("CreditCard", false);
                 context.creditCard = account;
                 context.paymentMethodType = paymentMethodType;
             } else if ("EFT_ACCOUNT".equals(paymentMethod.paymentMethodTypeId)) {
                 paymentMethodType = "EFT";
-                account = paymentMethod.getRelatedOne("EftAccount");
+                account = paymentMethod.getRelatedOne("EftAccount", false);
                 context.eftAccount = account;
                 context.paymentMethodType = paymentMethodType;
             }
             if (account) {
-                address = account.getRelatedOne("PostalAddress");
+                address = account.getRelatedOne("PostalAddress", false);
                 context.postalAddress = address;
             }
         }

Modified: ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/CheckoutReview.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/CheckoutReview.groovy?rev=1343485&r1=1343484&r2=1343485&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/CheckoutReview.groovy (original)
+++ ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/CheckoutReview.groovy Tue May 29 04:13:04 2012
@@ -62,7 +62,7 @@ context.headerAdjustmentsToShow = OrderR
 
 orderSubTotal = OrderReadHelper.getOrderItemsSubTotal(orderItems, orderAdjustments);
 context.orderSubTotal = orderSubTotal;
-context.placingCustomerPerson = userLogin?.getRelatedOne("Person");
+context.placingCustomerPerson = userLogin?.getRelatedOne("Person", false);
 context.shippingAddress = cart.getShippingAddress();
 
 paymentMethods = cart.getPaymentMethods();
@@ -73,11 +73,11 @@ if (paymentMethods) {
 }
 
 if ("CREDIT_CARD".equals(paymentMethod?.paymentMethodTypeId)) {
-    creditCard = paymentMethod.getRelatedOneCache("CreditCard");
+    creditCard = paymentMethod.getRelatedOne("CreditCard", true);
     context.creditCard = creditCard;
     context.formattedCardNumber = ContactHelper.formatCreditCard(creditCard);
 } else if ("EFT_ACCOUNT".equals(paymentMethod?.paymentMethodTypeId)) {
-    eftAccount = paymentMethod.getRelatedOneCache("EftAccount");
+    eftAccount = paymentMethod.getRelatedOne("EftAccount", true);
     context.eftAccount = eftAccount;
 }
 
@@ -101,8 +101,8 @@ if (productStore) {
 
 billingAddress = null;
 if (paymentMethod) {
-    creditCard = paymentMethod.getRelatedOne("CreditCard");
-    billingAddress = creditCard?.getRelatedOne("PostalAddress");
+    creditCard = paymentMethod.getRelatedOne("CreditCard", false);
+    billingAddress = creditCard?.getRelatedOne("PostalAddress", false);
 }
 if (billingAddress) context.billingAddress = billingAddress;
 

Modified: ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/CheckoutShippingAddress.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/CheckoutShippingAddress.groovy?rev=1343485&r1=1343484&r2=1343485&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/CheckoutShippingAddress.groovy (original)
+++ ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/CheckoutShippingAddress.groovy Tue May 29 04:13:04 2012
@@ -29,7 +29,7 @@ import org.ofbiz.entity.condition.Entity
 import javolution.util.FastList;
 
 cart = session.getAttribute("shoppingCart");
-party = userLogin.getRelatedOne("Party");
+party = userLogin.getRelatedOne("Party", false);
 partyId = party.partyId;
 productStoreId = ProductStoreWorker.getProductStoreId(request);
 

Modified: ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/SetAdditionalParty.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/SetAdditionalParty.groovy?rev=1343485&r1=1343484&r2=1343485&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/SetAdditionalParty.groovy (original)
+++ ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/SetAdditionalParty.groovy Tue May 29 04:13:04 2012
@@ -35,7 +35,7 @@ if (!request.getParameterValues("additio
     roles = delegator.findByAnd("PartyRole", [partyId : additionalPartyId], null, false);
     roleData = [];
     roles.each { role ->
-        roleData.add(role.getRelatedOne("RoleType"));
+        roleData.add(role.getRelatedOne("RoleType", false));
     }
     context.roles = roleData;
 }

Modified: ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/ShipSettings.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/ShipSettings.groovy?rev=1343485&r1=1343484&r2=1343485&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/ShipSettings.groovy (original)
+++ ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/ShipSettings.groovy Tue May 29 04:13:04 2012
@@ -49,7 +49,7 @@ if ("SALES_ORDER".equals(cart.getOrderTy
         orderParty = delegator.findOne("Party", [partyId : orderPartyId], false);
         if (orderParty) {
             shippingContactMechList = ContactHelper.getContactMech(orderParty, "SHIPPING_LOCATION", "POSTAL_ADDRESS", false);
-            orderPerson = orderParty.getRelatedOne("Person");
+            orderPerson = orderParty.getRelatedOne("Person", false);
             context.orderParty = orderParty;
             context.orderPerson = orderPerson;
             context.shippingContactMechList = shippingContactMechList;
@@ -76,7 +76,7 @@ if ("SALES_ORDER".equals(cart.getOrderTy
     if (!"_NA_".equals(orderPartyId)) {
         orderParty = delegator.findOne("Party", [partyId : orderPartyId], false);
         if (orderParty) {
-           orderPerson = orderParty.getRelatedOne("Person");
+           orderPerson = orderParty.getRelatedOne("Person", false);
            context.orderParty = orderParty;
            context.orderPerson = orderPerson;
          }