Wrox Home  
Search P2P Archive for: Go

  Return to Index  

enterprise_java_beans thread: is this orderby query right? As I am getting an error.


Message #1 by "Ronak Parekh" <rons4174@h...> on Tue, 5 Nov 2002 21:14:08
Ronak,

As Order By is an extension to EJB-QL I'm assuming you have something vendor
specific way of implementing it in your ejb-jar.xml or xdoclet.  Also, ORDER
BY is two words (in the jboss extension as well as SQL).

Hope this helps, good luck,

Cliff

----- Original Message -----
From: "Ronak Parekh" <rons4174@h...>
To: "Enterprise Java Beans" <enterprise_java_beans@p...>
Sent: Tuesday, November 05, 2002 9:14 PM
Subject: [enterprise_java_beans] is this orderby query right? As I am
getting an error.


> This is the query:
>
> <query>
> <query-method>
> <method-name>findAllWithConstraint</method-name>
> <method-params/>
> </query-method>
> <ejb-ql><![CDATA[SELECT OBJECT(o) FROM users AS o ORDERBY o.iD
> DESC]]></ejb-ql>
> </query>
>
> This is the error:
>         weblogic.ejb20.cmp.rdbms.finders.IllegalExpressionException:
> While trying to process Finder
>         Method Name: findAllWithConstraint
>         Parameter Types: ()
>         EJB Query: SELECT OBJECT(o) FROM users AS o ORDERBY o.iD DESC
>         )
> Could not parse EJB QL expression: SELECT OBJECT(o) FROM users AS o
> ORDERBY o.iD DESC
>
> Please tell me the problem with this query
> Ronak Parekh
>


  Return to Index