cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrus Adamchik (JIRA)" <>
Subject [jira] Created: (CAY-1361) SelectQuery.aliasPathSplits does nothing
Date Sun, 10 Jan 2010 12:16:54 GMT
SelectQuery.aliasPathSplits does nothing

                 Key: CAY-1361
             Project: Cayenne
          Issue Type: Bug
          Components: Core Library
    Affects Versions: 3.0RC1
            Reporter: Andrus Adamchik
            Assignee: Andrus Adamchik
             Fix For: 3.0RC2

SelectQuery.aliasPathSplits doesn't actually add the split expressions, so a test like this
generates an exception:

        SelectQuery query = new SelectQuery(Artist.class);
        query.andQualifier(ExpressionFactory.matchExp("p.paintingTitle", "X"));
        query.aliasPathSplits("paintingArray", "p");

INFO: *** error.
org.apache.cayenne.exp.ExpressionException: [v.3.1-SNAPSHOT ${} ${}]
Can't resolve path component: [Artist.p].
	at org.apache.cayenne.access.trans.QueryAssemblerHelper.appendObjPath(
	at org.apache.cayenne.access.trans.QualifierTranslator.objectNode(

The fix is rather simple - register the aliases in the query metadata (i.e. make the method
do what it is supposed to do).

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message