Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0038135
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] A. Platformminorhave not tried2018-03-14 12:502018-03-21 14:28
ReportershuehnerView Statuspublic 
Assigned Toshuehner 
PrioritynormalResolutionfixedFixed in Version3.0PR18Q2
StatusclosedFix in branchFixed in SCM revisionc6e6d9b1a8f0
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Toalostale
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0038135: OBContext.getOrganizationList is not using bind-parameters

DescriptionThis 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-
TagsPerformance
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
blocks design defect 0038136 acknowledgedplatform Tracking issue: Find & Fix queries not using bind-params but embedding values into query string 

-  Notes
(0103288)
hgbot (developer)
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 (developer)
2018-03-16 09:16

Repository: erp/devel/pi
Changeset: 1a95cbaaf72456c7fd4f54889603cbd21c96e68c
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Fri Mar 16 09:04:39 2018 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/1a95cbaaf72456c7fd4f54889603cbd21c96e68c [^]

related to bug 38135: auto formatting after last changes

---
M src/org/openbravo/dal/core/OBContext.java
---
(0103306)
hgbot (developer)
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
---
(0103307)
alostale (developer)
2018-03-16 09:17

-Tested: there's no change in the resutls
-Reviewed: applied some minor changes
(0103330)
hudsonbot (developer)
2018-03-16 17:29

A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/5323533018b6 [^]
Maturity status: Test
(0103331)
hudsonbot (developer)
2018-03-16 17:29

A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/5323533018b6 [^]
Maturity status: Test

- 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


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker