This is an automated email from the ASF dual-hosted git repository.
surajk pushed a commit to branch trunk in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git The following commit(s) were added to refs/heads/trunk by this push: new d58ffe1 Fixed: Console warnings related to OrderHeader caching. (OFBIZ-11858) Thanks Praveen Sharma for the patch and Jacques for review. d58ffe1 is described below commit d58ffe1e8eeab264bd14ebfaea612ad5d96f1e84 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 2be8208..7eba5fe 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 c062fa1..0a8e50b 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<GenericValue> orderShipments = orderHeader.getRelated("OrderShipment", null, null, false); |
Free forum by Nabble | Edit this page |