cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nikita Timofeev <ntimof...@objectstyle.com>
Subject Re: Queries with joins and entity qualifiers are broken in cayenne-3.1.2
Date Fri, 15 Dec 2017 11:25:32 GMT
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, Владимир Сухинин
<suhininvladimir@gmail.com> 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

Mime
View raw message