Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0040578Openbravo ERPA. Platformpublic2019-04-10 12:322019-05-21 15:16
shuehner 
alostale 
normalminorhave not tried
closedfixed 
5
 
3.0PR19Q3 
caristu
Core
No
0040578: Utility.getListValueName is not using bind-parameters
This code is not using bind-params:

    String hql = " select rlt.name as name " + " from ADReference r, " + " ADList rl,"
        + " ADListTrl rlt" + " where rl.reference = r" + " and rlt.listReference = rl"
        + " and rlt.language.language = '" + lang + "'" + " and r.name = '" + ListName + "'"
        + " and rl.searchKey = '" + value + "'";
    Query<String> q = OBDal.getInstance().getSession().createQuery(hql, String.class);


same method later:

    hql = " select rl.name " + " from ADReference r, " + " ADList rl"
        + " where rl.reference = r" + " and r.name = '" + ListName + "'"
        + " and rl.searchKey = '" + value + "'";
    q = OBDal.getInstance().getSession().createQuery(hql, String.class);
-
No tags attached.
blocks design defect 0038136 acknowledged Triage Platform Base Tracking issue: Find & Fix queries not using bind-params but embedding values into query string 
Issue History
2019-04-10 12:32shuehnerNew Issue
2019-04-10 12:32shuehnerAssigned To => platform
2019-04-10 12:32shuehnerModules => Core
2019-04-10 12:32shuehnerTriggers an Emergency Pack => No
2019-04-10 12:32shuehnerRelationship addedblocks 0038136
2019-04-10 12:33shuehnerDescription Updatedbug_revision_view_page.php?rev_id=18613#r18613
2019-04-11 08:41alostaleAssigned Toplatform => alostale
2019-04-11 08:42alostaleReview Assigned To => caristu
2019-04-11 08:44hgbotCheckin
2019-04-11 08:44hgbotNote Added: 0111071
2019-04-11 08:44hgbotStatusnew => resolved
2019-04-11 08:44hgbotResolutionopen => fixed
2019-04-11 08:44hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/10b0c49679510a91e6285eee78ca696db762c596 [^]
2019-04-12 08:36caristuNote Added: 0111097
2019-04-12 08:36caristuStatusresolved => closed
2019-04-12 08:36caristuFixed in Version => 3.0PR19Q3
2019-05-21 15:16hudsonbotCheckin
2019-05-21 15:16hudsonbotNote Added: 0111965

Notes
(0111071)
hgbot   
2019-04-11 08:44   
Repository: erp/devel/pi
Changeset: 10b0c49679510a91e6285eee78ca696db762c596
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Thu Apr 11 08:17:54 2019 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/10b0c49679510a91e6285eee78ca696db762c596 [^]

fixed bug 40578: Utility.getListValueName is not using bind-parameters

---
M src/org/openbravo/erpCommon/utility/Utility.java
---
(0111097)
caristu   
2019-04-12 08:36   
Reviewed
(0111965)
hudsonbot   
2019-05-21 15:16   
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/9b8f37d9d85e [^]
Maturity status: Test