From d58ffe1e8eeab264bd14ebfaea612ad5d96f1e84 Mon Sep 17 00:00:00 2001 From: Suraj Khurana Date: Thu, 2 Jul 2020 10:55:55 +0530 Subject: [PATCH] Fixed: Console warnings related to OrderHeader caching. (OFBIZ-11858) Thanks Praveen Sharma for the patch and Jacques for review. --- applications/order/groovyScripts/order/OrderView.groovy | 2 +- .../product/minilang/product/store/ProductStoreServices.xml | 2 +- .../main/java/org/apache/ofbiz/shipment/test/IssuanceTest.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/applications/order/groovyScripts/order/OrderView.groovy b/applications/order/groovyScripts/order/OrderView.groovy index 2be82087d8..7eba5fea96 100644 --- a/applications/order/groovyScripts/order/OrderView.groovy +++ b/applications/order/groovyScripts/order/OrderView.groovy @@ -59,7 +59,7 @@ orderAdjustments = null comments = null if (orderId) { - orderHeader = from('OrderHeader').where('orderId', orderId).cache(false).queryFirst() + orderHeader = from('OrderHeader').where('orderId', orderId).queryOne() comments = select("orderItemSeqId", "changeComments", "changeDatetime", "changeUserLogin").from("OrderItemChange").where(UtilMisc.toList(EntityCondition.makeCondition("orderId", EntityOperator.EQUALS, orderId))).orderBy("-changeDatetime").queryList() } diff --git a/applications/product/minilang/product/store/ProductStoreServices.xml b/applications/product/minilang/product/store/ProductStoreServices.xml index fcc2b25ffb..e5baab4aba 100644 --- a/applications/product/minilang/product/store/ProductStoreServices.xml +++ b/applications/product/minilang/product/store/ProductStoreServices.xml @@ -134,7 +134,7 @@ under the License. - + diff --git a/applications/product/src/main/java/org/apache/ofbiz/shipment/test/IssuanceTest.java b/applications/product/src/main/java/org/apache/ofbiz/shipment/test/IssuanceTest.java index c062fa13af..0a8e50b300 100644 --- a/applications/product/src/main/java/org/apache/ofbiz/shipment/test/IssuanceTest.java +++ b/applications/product/src/main/java/org/apache/ofbiz/shipment/test/IssuanceTest.java @@ -55,7 +55,7 @@ public class IssuanceTest extends OFBizTestCase { BigDecimal.valueOf(1000L), false); String shipmentId = packSession.complete(false); - GenericValue orderHeader = EntityQuery.use(delegator).from("OrderHeader").where("orderId", orderId).cache().queryOne(); + GenericValue orderHeader = EntityQuery.use(delegator).from("OrderHeader").where("orderId", orderId).queryOne(); // Test the OrderShipment is correct List orderShipments = orderHeader.getRelated("OrderShipment", null, null, false);