Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0040194Openbravo ERPA. Platformpublic2019-02-14 11:062019-03-28 14:56
JONHM 
alostale 
highmajoralways
closedfixed 
5
 
3.0PR19Q2 
caristu
Core
No
0040194: HQL based windows are not supporting BLOB images
HQL based windows are not supporting BLOB images. When an image is added to the query, an error is raised when opening the window:
Error occured: freemarker.template.TemplateModelException: get(tabView) failed on instance of org.openbravo.client.application.window.StandardWindowComponent
- Install attached module
- Open 'Image Window' window, you will get an error
 * If the p.image is deleted from the HQL query (and also the related column and field), the window is correctly opened

  -> ERROR:
...
Caused by: java.lang.ClassCastException: org.openbravo.base.model.domaintype.SearchDomainType cannot be cast to org.openbravo.base.model.domaintype.PrimitiveDomainType
    at org.openbravo.service.datasource.HQLDataSourceService.getDataSourceProperties(HQLDataSourceService.java:127) ~[classes/:?]
    at org.openbravo.service.datasource.DataSourceComponent.getDataSourceProperties(DataSourceComponent.java:80) ~[classes/:?]
...
No tags attached.
? com.openbravo.addimage-1.0.0.obx (10,004) 2019-02-14 11:06
https://issues.openbravo.com/file_download.php?file_id=12657&type=bug
Issue History
2019-02-14 11:06JONHMNew Issue
2019-02-14 11:06JONHMAssigned To => platform
2019-02-14 11:06JONHMFile Added: com.openbravo.addimage-1.0.0.obx
2019-02-14 11:06JONHMModules => Core
2019-02-14 11:06JONHMResolution time => 1520377200
2019-02-14 11:06JONHMTriggers an Emergency Pack => No
2019-02-14 11:14JONHMDescription Updatedbug_revision_view_page.php?rev_id=18318#r18318
2019-02-22 10:14alostaleResolution time1520377200 => 1551913200
2019-02-22 10:14alostaleAssigned Toplatform => alostale
2019-02-22 10:14alostaleReview Assigned To => caristu
2019-02-22 10:26alostaleSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=18355#r18355
2019-02-22 10:34hgbotCheckin
2019-02-22 10:34hgbotNote Added: 0110023
2019-02-22 10:34hgbotStatusnew => resolved
2019-02-22 10:34hgbotResolutionopen => fixed
2019-02-22 10:34hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/965c58c02c48aa8ccd07512d850d88d508aa9127 [^]
2019-02-22 13:05caristuNote Added: 0110033
2019-02-22 13:05caristuStatusresolved => closed
2019-02-22 13:05caristuFixed in Version => 3.0PR19Q2
2019-03-28 14:56hudsonbotCheckin
2019-03-28 14:56hudsonbotNote Added: 0110833

Notes
(0110023)
hgbot   
2019-02-22 10:34   
Repository: erp/devel/pi
Changeset: 965c58c02c48aa8ccd07512d850d88d508aa9127
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Fri Feb 22 10:24:47 2019 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/965c58c02c48aa8ccd07512d850d88d508aa9127 [^]

fixed issue 40194: HQL based windows don't support Image reference

  When a image reference column was included in a HQL window, ClassCastException
  was thrown trying to cast SearchDomainType to PrimitiveDomainType. This was
  caused by an incorrect assumption that all non primitive properties must extend
  ForeignKeyUIDefinition.

  Now if a propoerty is primitive is checked by looking its domain type.

---
M modules/org.openbravo.service.datasource/src/org/openbravo/service/datasource/HQLDataSourceService.java
---
(0110033)
caristu   
2019-02-22 13:05   
Reviewed + tested
(0110833)
hudsonbot   
2019-03-28 14:56   
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/b2fbc1588df4 [^]
Maturity status: Test