• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to do orderBy with EJB (CMP)??

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What is the correct statement to do orderBy in Oracle9i dev with EJB (CMP)?? I know this is possible with EJB (BMP).

thanks,
-AARON
[ July 25, 2002: Message edited by: Long Huynh ]
 
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am going to move this thread to a more appropriate forum, so that you can get answers quicker.
Mark
 
Ranch Hand
Posts: 401
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In EJB 2.0 CMP, you specify the query in ejb-jar.xml using EJB-QL. There is no ORDER BY in EJB-QL (yet - it is coming in EJB 2.1).
I know that Weblogic has an extention to EJB-QL that includes an ORDERBY keyword. Other appservers may do something similar, but I don't know.
If the ordering is important, you are stuck with BMP. Or you could do the ordering on the client using an appropriate Comparator with the Collection returned by the finder. Ugh.
 
Ranch Hand
Posts: 160
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes Dave is correct.
Order By is introduced in the EJB1.3
Chk the EJB 1.3 public draft
Rgds
-Siva
sivajag@hotmail.com
reply
    Bookmark Topic Watch Topic
  • New Topic