Openbravo Issue Tracking System - Openbravo ERP |
View Issue Details |
|
ID | Project | Category | View Status | Date Submitted | Last Update |
0038135 | Openbravo ERP | A. Platform | public | 2018-03-14 12:50 | 2018-03-21 14:28 |
|
Reporter | shuehner | |
Assigned To | shuehner | |
Priority | normal | Severity | minor | Reproducibility | have not tried |
Status | closed | Resolution | fixed | |
Platform | | OS | 5 | OS Version | |
Product Version | | |
Target Version | | Fixed in Version | 3.0PR18Q2 | |
Merge Request Status | |
Review Assigned To | alostale |
OBNetwork customer | |
Web browser | |
Modules | Core |
Support ticket | |
Regression level | |
Regression date | |
Regression introduced in release | |
Regression introduced by commit | |
Triggers an Emergency Pack | No |
|
Summary | 0038135: OBContext.getOrganizationList is not using bind-parameters |
Description | This code is not using bind-params
final Query qry = SessionHandler.getInstance().createQuery(
"select o.id from " + Organization.class.getName() + " o, "
+ RoleOrganization.class.getName() + " roa where o." + Organization.PROPERTY_ID
+ "=roa." + RoleOrganization.PROPERTY_ORGANIZATION + "." + Organization.PROPERTY_ID
+ " and roa." + RoleOrganization.PROPERTY_ROLE + "." + Organization.PROPERTY_ID + "='"
+ targetRole.getId() + "' and roa." + RoleOrganization.PROPERTY_ACTIVE + "='Y' and o."
+ Organization.PROPERTY_ACTIVE + "='" + propertyActive + "'");
@SuppressWarnings("unchecked")
List<String> currentOrgList = qry.list(); |
Steps To Reproduce | - |
Proposed Solution | |
Additional Information | |
Tags | Performance |
Relationships | blocks | design defect | 0038136 | | acknowledged | Triage Platform Base | Tracking issue: Find & Fix queries not using bind-params but embedding values into query string |
|
Attached Files | |
|
Issue History |
Date Modified | Username | Field | Change |
2018-03-14 12:50 | shuehner | New Issue | |
2018-03-14 12:50 | shuehner | Assigned To | => platform |
2018-03-14 12:50 | shuehner | Modules | => Core |
2018-03-14 12:50 | shuehner | Triggers an Emergency Pack | => No |
2018-03-14 13:04 | shuehner | Relationship added | blocks 0038136 |
2018-03-14 16:46 | shuehner | Assigned To | platform => shuehner |
2018-03-15 17:27 | hgbot | Checkin | |
2018-03-15 17:27 | hgbot | Note Added: 0103288 | |
2018-03-15 17:27 | hgbot | Status | new => resolved |
2018-03-15 17:27 | hgbot | Resolution | open => fixed |
2018-03-15 17:27 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/pi/rev/c6e6d9b1a8f052242292dc619c4802b27972e7cb [^] |
2018-03-15 17:28 | shuehner | Review Assigned To | => alostale |
2018-03-16 09:16 | hgbot | Checkin | |
2018-03-16 09:16 | hgbot | Note Added: 0103305 | |
2018-03-16 09:16 | hgbot | Checkin | |
2018-03-16 09:16 | hgbot | Note Added: 0103306 | |
2018-03-16 09:17 | alostale | Tag Attached: Performance | |
2018-03-16 09:17 | alostale | Note Added: 0103307 | |
2018-03-16 09:17 | alostale | Status | resolved => closed |
2018-03-16 09:17 | alostale | Fixed in Version | => 3.0PR18Q3 |
2018-03-16 17:29 | hudsonbot | Checkin | |
2018-03-16 17:29 | hudsonbot | Note Added: 0103330 | |
2018-03-16 17:29 | hudsonbot | Checkin | |
2018-03-16 17:29 | hudsonbot | Note Added: 0103331 | |
2018-03-21 14:28 | shuehner | Fixed in Version | 3.0PR18Q3 => 3.0PR18Q2 |
Notes |
|
(0103288)
|
hgbot
|
2018-03-15 17:27
|
|
Repository: erp/devel/pi
Changeset: c6e6d9b1a8f052242292dc619c4802b27972e7cb
Author: Stefan Hühner <stefan.huehner <at> openbravo.com>
Date: Thu Mar 15 10:44:22 2018 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/c6e6d9b1a8f052242292dc619c4802b27972e7cb [^]
Fixed 38135. Use bind-parameters instead of mixing data with the HQL-String.
- Modify getOne utility method to receive a Map of parameters to be applied
to the query
- Change all callers to use named parameters in the HQL string and a map
for the param values
- Remove the 2 extra copies of getOne now no longer required.
- in getOrganizations function
- change HQL positional parameter to named one as that is better style
and avoid a future hibernate behavior change
---
M src/org/openbravo/dal/core/OBContext.java
---
|
|
|
(0103305)
|
hgbot
|
2018-03-16 09:16
|
|
|
|
(0103306)
|
hgbot
|
2018-03-16 09:16
|
|
Repository: erp/devel/pi
Changeset: 305d3e3c2b9ade187184e068a167d9737744ca5c
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Fri Mar 16 09:13:27 2018 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/305d3e3c2b9ade187184e068a167d9737744ca5c [^]
related to bug 38135: minor changes
- don't name parameter as clientId if it receives a client object
- don't oversize param maps as size is fixed and known
---
M src/org/openbravo/dal/core/OBContext.java
---
|
|
|
|
-Tested: there's no change in the resutls
-Reviewed: applied some minor changes |
|
|
|
|
|
|
|