You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cayenne.apache.org by "Andrus Adamchik (JIRA)" <ji...@apache.org> on 2010/01/10 13:16:54 UTC

[jira] Created: (CAY-1361) SelectQuery.aliasPathSplits does nothing

SelectQuery.aliasPathSplits does nothing
----------------------------------------

                 Key: CAY-1361
                 URL: https://issues.apache.org/jira/browse/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");
        context.performQuery(query);

INFO: *** error.
org.apache.cayenne.exp.ExpressionException: [v.3.1-SNAPSHOT ${project.build.date} ${project.build.time}] Can't resolve path component: [Artist.p].
	at org.apache.cayenne.map.PathComponentIterator.invalidPathException(PathComponentIterator.java:145)
	at org.apache.cayenne.map.PathComponentIterator.next(PathComponentIterator.java:133)
	at org.apache.cayenne.map.PathComponentIterator.next(PathComponentIterator.java:33)
	at org.apache.cayenne.access.trans.QueryAssemblerHelper.appendObjPath(QueryAssemblerHelper.java:114)
	at org.apache.cayenne.access.trans.QualifierTranslator.objectNode(QualifierTranslator.java:366)

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.


[jira] Closed: (CAY-1361) SelectQuery.aliasPathSplits does nothing

Posted by "Andrus Adamchik (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CAY-1361?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrus Adamchik closed CAY-1361.
--------------------------------

    Resolution: Fixed

> SelectQuery.aliasPathSplits does nothing
> ----------------------------------------
>
>                 Key: CAY-1361
>                 URL: https://issues.apache.org/jira/browse/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");
>         context.performQuery(query);
> INFO: *** error.
> org.apache.cayenne.exp.ExpressionException: [v.3.1-SNAPSHOT ${project.build.date} ${project.build.time}] Can't resolve path component: [Artist.p].
> 	at org.apache.cayenne.map.PathComponentIterator.invalidPathException(PathComponentIterator.java:145)
> 	at org.apache.cayenne.map.PathComponentIterator.next(PathComponentIterator.java:133)
> 	at org.apache.cayenne.map.PathComponentIterator.next(PathComponentIterator.java:33)
> 	at org.apache.cayenne.access.trans.QueryAssemblerHelper.appendObjPath(QueryAssemblerHelper.java:114)
> 	at org.apache.cayenne.access.trans.QualifierTranslator.objectNode(QualifierTranslator.java:366)
> 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.