This is an automated email from the ASF dual-hosted git repository.
surajk pushed a commit to branch release18.12 in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git The following commit(s) were added to refs/heads/release18.12 by this push: new b31ed9c Fixed: Console warnings related to OrderHeader caching. (OFBIZ-11858) Thanks Praveen Sharma for the patch and Jacques for review. b31ed9c is described below commit b31ed9c4ad0c9c8f9733bbb8e8c4b5fa6d6a1730 Author: Suraj Khurana <[hidden email]> AuthorDate: Thu Jul 2 10:55:55 2020 +0530 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 +- applications/product/minilang/product/store/ProductStoreServices.xml | 2 +- .../src/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 d304fce..f527e0a 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 fcc2b25..e5baab4 100644 --- a/applications/product/minilang/product/store/ProductStoreServices.xml +++ b/applications/product/minilang/product/store/ProductStoreServices.xml @@ -134,7 +134,7 @@ under the License. <simple-method method-name="reserveStoreInventory" short-description="Reserve Store Inventory"> <entity-one entity-name="Product" value-field="product" use-cache="true"/> <entity-one entity-name="ProductStore" value-field="productStore" use-cache="true"/> - <entity-one entity-name="OrderHeader" value-field="orderHeader" use-cache="true"/> + <entity-one entity-name="OrderHeader" value-field="orderHeader"/> <set field="parameters.priority" from-field="orderHeader.priority"/> <if-empty field="productStore"> <add-error> 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 165f056..b617461 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 @@ -62,7 +62,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<GenericValue> orderShipments = orderHeader.getRelated("OrderShipment", null, null, false); |
Free forum by Nabble | Edit this page |