Applied patch from jira issue - OFBIZ-5844 - Convert java files to EntityQuery.
===========================================================
Thanks Scott for reviewing and reporting an issue.
Scott's comment in email:
The where() methods don't currently support creating an entity
condition in the style used above. You'll need to wrap those three
parameters in a EntityCondition.makeCondition() method, i.e.
paymentMethodTypes = EntityQuery.use(delegator).from("PaymentMethodType")
.where(EntityCondition.makeCondition("paymentMethodTypeId",
EntityOperator.NOT_EQUAL, "EXT_OFFLINE")).queryList();
Attached is a patch with suggested solution.
==================================================
Thanks Arun for the contribution.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1641317 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -150,7 +150,7 @@ public class OrderManagerEvents {
|
||||
List<GenericValue> paymentMethodTypes = null;
|
||||
|
||||
try {
|
||||
paymentMethodTypes = EntityQuery.use(delegator).from("PaymentMethodType").where("paymentMethodTypeId", EntityOperator.NOT_EQUAL, "EXT_OFFLINE").queryList();
|
||||
paymentMethodTypes = EntityQuery.use(delegator).from("PaymentMethodType").where(EntityCondition.makeCondition("paymentMethodTypeId", EntityOperator.NOT_EQUAL, "EXT_OFFLINE")).queryList();
|
||||
} catch (GenericEntityException e) {
|
||||
Debug.logError(e, "Problems getting payment types", module);
|
||||
request.setAttribute("_ERROR_MESSAGE_", UtilProperties.getMessage(resource_error,"OrderProblemsWithPaymentTypeLookup", locale));
|
||||
|
||||
Reference in New Issue
Block a user