[ https://issues.apache.org/jira/browse/OFBIZ-5315?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13766305#comment-13766305 ]
Jacques Le Roux commented on OFBIZ-5315: ---------------------------------------- When I look at what exists, I wonder about something. In trunk (we don't fix releases only backport fixes to them), we have at line 464 colValue = alias.entityAlias + "." + SqlJdbcUtil.filterColName(aliasedField.getColName()); colName = SqlJdbcUtil.filterColName(colValue); Which should then be really be colValue = alias.entityAlias + "_" + SqlJdbcUtil.filterColName(aliasedField.getColName()); Then should your patch (please in future replace tabs by spaces in your patches) not be rather? String colName = entityAlias + "_" + SqlJdbcUtil.filterColName(modelField.getColName()); I did not test nor thought much about it, but something seems inconsistent to me, are they 2 different cases? > view-entity complex-alias field name bug when view-entities reference other > view-entities > ----------------------------------------------------------------------------------------- > > Key: OFBIZ-5315 > URL: https://issues.apache.org/jira/browse/OFBIZ-5315 > Project: OFBiz > Issue Type: Bug > Components: framework > Affects Versions: Release Branch 11.04 > Reporter: Christian Carlow > Priority: Minor > Fix For: Release Branch 11.04 > > Attachments: ModelViewEntity.java.patch > > > Field names used in complex-alias are named incorrectly when SQL statements > are generated. > The following complex alias: > <alias name="quantity"> > <complex-alias operator="-"> > <complex-alias-field entity-alias="A" field="field1"/> > <complex-alias-field entity-alias="B" field="field2"/> > </complex-alias> > </alias> > Will result with the following generated SQL when A and B are also > view-entities: > SELECT (C.A.field1 + C.B.field2) -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira