Hi Vladimir, Thanks for information, it was really helpful. I've found the difference between ObjPath and DbPath and fixed this case in 4.1 branch [1]. Qualifiers set via Modeler always use ObjPath so this was a rare case to met. I'll port this fix for 4.0 and 3.1 branches soon.
[1] https://github.com/apache/cayenne/commit/41dd56c5af47c9d9afb8e259727dfaf4dd9a6cca On Tue, Dec 12, 2017 at 3:35 PM, Владимир Сухинин <[email protected]> wrote: > I hope this information will help you. > The problem seems to be somewhere around there: > > at org.apache.cayenne.access.trans.JoinStack.appendJoinSubtree(Appendable, > JoinTreeNode) > 178: qualifierTranslator.doAppendPart(dbQualifier); > > where dbQualifier is our qualifier. > It goes down to > > org.apache.cayenne.access.trans.QueryAssemblerHelper.processColumnWithQuoteSqlIdentifiers(DbAttribute > dbAttr, Expression pathExp) > 294: String alias = (queryAssembler.supportsTableAliases()) ? queryAssembler > 295: .getCurrentAlias() : null; > > returns root table alias (usually "t0") instead of joined table ("t1" or > other), if pathExp was matchDbExp -- Best regards, Nikita Timofeev
