Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0037931Openbravo ERP00. Application dictionarypublic2018-02-15 12:322022-02-01 08:05
eduardo_Argal 
Triage Platform Base 
normalminoralways
acknowledgedopen 
5
 
 
Core
No
0037931: Parameter replacement not working for hqlwhereclause in a tab when tab is based on a HQLQuery table
when creating a window based on a HQLQuery table, if you try to define a whereclause based on the selected row or just add any parameter to that expression (@xxxx@) those parameters are not being replaced with the proper value.
This behavior works fine when the table used to build the tab is a standard table (when it maps to a DB table) while it fails when using HQL based tables.
This problem can be workarounded by defining a transformer java class to modify the hql and replace those values.
1) Create an hql table. For example based on a simple hql query to ProductCategory (select cat.id, cat.name from ProductCategory cat)
2)Add some columns: id, name
3) Create a tab below Product window / Product tab: Prueba. this tab is based on previous table. add a hqlwhereclasuse ("not exists (from Product p where p.productCategory.id = cat.id and p.id = @Product.id@)")
4) Create fields

when query is launched you will see an error related to having "@" in final query although it should have been replaced.
No tags attached.
Issue History
2018-02-15 12:32eduardo_ArgalNew Issue
2018-02-15 12:32eduardo_ArgalAssigned To => platform
2018-02-15 12:32eduardo_ArgalModules => Core
2018-02-15 12:32eduardo_ArgalTriggers an Emergency Pack => No
2018-06-15 11:28alostaleStatusnew => acknowledged
2022-02-01 08:05alostaleAssigned Toplatform => Triage Platform Base

There are no notes attached to this issue.