You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by Kevin Sutter <kw...@gmail.com> on 2009/09/09 00:37:31 UTC
Re: [jira] Resolved: (OPENJPA-730) Error when I add "ORDER BY
count(f.report.id)" to my query
This JIRA was marked Resolved since it was only a question about a potential
feature request. The problem reported was not applicable to a JPA 1.0
environment. So, no fix was integrated for this JIRA. If you are
experiencing a similar problem with JPA 1.0 functionality, a separate thread
might be worthwhile to get some attention.
Thanks,
Kevin
On Mon, Sep 7, 2009 at 5:07 AM, nareshs <na...@gmail.com> wrote:
>
> Hi ,
>
> I am experiencing the same for Order By Upper x.name.
> Is this also addressed in the fix.
>
> JIRA jira@apache.org wrote:
> >
> >
> > [
> >
> https://issues.apache.org/jira/browse/OPENJPA-730?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
> > ]
> >
> > Michael Dick resolved OPENJPA-730.
> > ----------------------------------
> >
> > Resolution: Later
> >
> > Since the issue is a question, and unfortunately the answer is no, I'm
> > resolving the issue. If this is a useful feature to add please re-open
> and
> > mark as a New Feature. Thanks.
> >
> >> Error when I add "ORDER BY count(f.report.id)" to my query
> >> -----------------------------------------------------------
> >>
> >> Key: OPENJPA-730
> >> URL: https://issues.apache.org/jira/browse/OPENJPA-730
> >> Project: OpenJPA
> >> Issue Type: Question
> >> Components: query
> >> Affects Versions: 1.0.0
> >> Environment: WIN
> >> Reporter: teto
> >>
> >> I'm getting error when i added "ORDER BY count(column) " to my JPQL
> >> query.
> >> ERROR:
> >> ----------------
> >> <openjpa-1.0.0-r420667:568756 nonfatal user error>
> >> org.apache.openjpa.persistence.ArgumentException: An error occurred
> while
> >> parsing the query filter 'SELECT f.report.id FROM FavReports f, User
> u,
> >> Report r WHERE f.report.id=r.id and f.user.id = u.id and
> >> UPPER(u.userName)= UPPER('USERNAME1') GROUP BY f.report.id ORDER BY
> >> count(f.report.id) DESC'.
> >> Error message: <openjpa-1.0.0-r420667:568756 nonfatal user error>
> >> org.apache.openjpa.kernel.jpql.ParseException: Encountered "count" at
> >> character 175, but expected: [<IDENTIFIER>].
> >> at
> >>
> org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder$ParsedJPQL.parse(JPQLExpressionBuilder.java:1666)
> >> ++++++++++++++++++++++
> >> The query :
> >> ------------
> >> String jpql = "SELECT f.report.id FROM FavReports f, User u, Report r
> >> WHERE f.report.id=r.id and f.user.id = u.id and UPPER(u.userName)=
> >> UPPER('" + userName
> >> + "') GROUP BY f.report.id ORDER BY
> count(f.report.id) DESC";
> >> Does JPQL support the ORDER BY COUNT(id) ????????
> >
> > --
> > This message is automatically generated by JIRA.
> > -
> > You can reply to this email to add a comment to the issue online.
> >
> >
> >
>
> --
> View this message in context:
> http://n2.nabble.com/jira-Created-OPENJPA-730-Error-when-I-add-ORDER-BY-count-f-report-id-to-my-query-tp1099837p3596437.html
> Sent from the OpenJPA Developers mailing list archive at Nabble.com.
>