Project:
View Revisions: Issue #33706 | [ Back to Issue ] | ||
Summary | 0033706: SelectorDataSourceFilter does accidental extra queries in 'Add Payment' flow of Sales Orders | ||
Revision | 2016-08-12 17:38 by shuehner | ||
Description | This class does some accidental extra queries by calling .list() several time for the same OBCriteria instance. OBCriteria<Parameter> qParam = OBDal.getInstance().createCriteria(Parameter.class); qParam.add(Restrictions.eq(Parameter.PROPERTY_ID, parameters.get(SelectorConstants.DS_REQUEST_SELECTOR_FIELD_ID))); Parameter param = qParam.list().get(0); Validation validation = qParam.list().get(0).getValidation(); if (validation != null) { if (validation.getType().equals("HQL_JS")) { String validationCode = qParam.list().get(0).getValidation().getValidationCode(); Also that code does read parameter via its primary key. So query could instead be just a OBDal.getInstance().get call |
||
Revision | 2016-08-12 17:36 by shuehner | ||
Description | This class does some accidental extra queries by calling .list() several time for the same OBCriteria instance. Parameter param = qParam.list().get(0); Validation validation = qParam.list().get(0).getValidation(); if (validation != null) { if (validation.getType().equals("HQL_JS")) { String validationCode = qParam.list().get(0).getValidation().getValidationCode(); |
Copyright © 2000 - 2009 MantisBT Group |