Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0040701Openbravo ERPZ. Otherspublic2019-04-04 13:382019-05-03 11:58
alostale 
nonofrancisco 
normalminorhave not tried
closedopen 
5
 
3.0PR18Q4.4 
vmromanos
Core
No
0040701: use bind-parameters in FactLine
FactLine.getDescription method is generating a sql setting parameters by String concatenation, replace tokens by bind parameters.
-
If query can be executed in Dal transaction can be done as:

        strSql = strSql.replaceAll("@RecordId@", ":recordId").replaceAll("@Line@", ":lineId");
        description.append(OBDal.getInstance().getSession()
            .createNativeQuery(strSql)
            .setParameter("lineId", localStrLine)
            .setParameter("recordId", strRecord_ID)
            .uniqueResult());
No tags attached.
blocks defect 0040523 closed nonofrancisco use bind-parameters in FactLine 
Issue History
2019-04-29 13:34nonofranciscoTypedefect => backport
2019-04-29 13:34nonofranciscoTarget Version => 3.0PR18Q4.4
2019-05-03 11:58vmromanosReview Assigned To => vmromanos
2019-05-03 11:58vmromanosNote Added: 0111470
2019-05-03 11:58vmromanosStatusscheduled => closed

Notes
(0111470)
vmromanos   
2019-05-03 11:58   
There is no need to backport to 18Q4 since 19Q1.1 is going to be promoted to CS very soon