Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Ejb-QL Problem  RSS feed

 
Amar Naik
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi i am using jboss 3.0.0 server and using CMP2.0 Entity bean
I am having difficulty in firing a query with order by clause.The query is listed below
<query>
<query-method>
<method-name>findByEmployeeIDAndDayID</method-name>
<method-params>
<method-param>java.lang.String</method-param>
<method-param>java.lang.String</method-param>
</method-params>
</query-method>
<ejb-ql>
<![CDATA[SELECT OBJECT(w) FROM worklog AS w WHERE w.strEmployeeID = ?1 AND w.strDayID = ?2 ORDER BY w.timeStartTim DESC]]>
</ejb-ql>
</query>

I am getting errors
Need Help
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ORDER BY is not supported by the EJB-QL, yet. I'm afraid you need to sort your collection in your Java code...
 
Amar Naik
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks Lasse for ur reply
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!