view-entity complex-alias bug

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

view-entity complex-alias bug

Christian Carlow-OFBizzer
Hi,

Does anyone know if the problem in the following post was ever patched?

http://mail-archives.apache.org/mod_mbox/ofbiz-user/200909.mbox/%3C25650299.post@talk.nabble.com%3E

Seems like important SQL functionality would be supported in OFBiz.
Reply | Threaded
Open this post in threaded view
|

Re: view-entity complex-alias bug

Christian Carlow-OFBizzer
In case anyone needs this functionality, figured it out myself.

Replace on line 990 of framework/entity/src/org/ofbiz/entity/model/ModelViewEntity.java:
        String colName = entityAlias + "." + modelField.getColName();
with:
       String colName = entityAlias + "." + SqlJdbcUtil.filterColName(modelField.getColName());
Reply | Threaded
Open this post in threaded view
|

Re: view-entity complex-alias bug

Paul Foxworthy
Hi OFBizzer,

Please create a Jira issue with a patch for this.

See https://cwiki.apache.org/OFBADMIN/ofbiz-contributors-best-practices.html for some guidance.

Cheers

Paul Foxworthy

OFBizzer wrote
In case anyone needs this functionality, figured it out myself.

Replace on line 990 of framework/entity/src/org/ofbiz/entity/model/ModelViewEntity.java:
        String colName = entityAlias + "." + modelField.getColName();
with:
       String colName = entityAlias + "." + SqlJdbcUtil.filterColName(modelField.getColName());
--
Coherent Software Australia Pty Ltd
http://www.coherentsoftware.com.au/

Bonsai ERP, the all-inclusive ERP system
http://www.bonsaierp.com.au/