Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0038199Openbravo ERPA. Platformpublic2018-03-22 15:412022-02-01 08:08
shuehner 
Triage Platform Base 
normalminorhave not tried
newopen 
5
 
 
Core
No
0038199: SqlC generated code should be able to use bind-variables for list of values (i.e. ad_client_id, ad_org_id) filters
Queries using SqlC for their filters of ad_client + ad_org to which a user has access to typically use the parameter of 'Type' replace which essentially embeds the values directly in the SQL test.

The code-generator should be enhanced to allow passing list of values as a param instead (i.e. pass String[]) to be able to change those queries to use bind-parameters
-
Example DefaultValuesData.select called from LoginUtils.fillSessionArguments generates SQL text which looks like:
SELECT GL_Category_ID AS COLUMNNAME FROM GL_Category WHERE isActive = 'Y' AND isDefault = 'Y' AND AD_Client_ID IN ('0','B6F3127B8CE64BB1A8AA601C8F937E9F') AND AD_Org_ID IN ('D2175200A5594844BC9D18960F58205E','7E7DA721AA12459B998F799B0150F40A','0','9A284CA3870D46998D56F08439146733') ORDER BY AD_Client_ID

which has the values of ad_client_id + ad_org_id directly embedded in the SQL string.
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 
blocks defect 0038200 new Triage Omni OMS DefaultValuesData.select (NOT xsql-generated) is not using bind-params for ad_client_id + ad_org_id filters 
Issue History
2018-03-22 15:41shuehnerNew Issue
2018-03-22 15:41shuehnerAssigned To => platform
2018-03-22 15:41shuehnerModules => Core
2018-03-22 15:41shuehnerTriggers an Emergency Pack => No
2018-03-22 15:41shuehnerRelationship addedblocks 0038136
2018-03-22 15:44shuehnerRelationship addedblocks 0038200
2022-02-01 08:08alostaleAssigned Toplatform => Triage Platform Base

There are no notes attached to this issue.