aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes Ordering collection returned from a CMR Method Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Ordering collection returned from a CMR Method" Watch "Ordering collection returned from a CMR Method" New topic
Author

Ordering collection returned from a CMR Method

Tribhuvan Agarwal
Greenhorn

Joined: Nov 24, 2003
Posts: 1
I have a CMR relationship with a 1 to many.
From that CMR method i get a collection.
That collection is not ordered. I need to get a ordered collection that is returned from that CMR Method. How to do this??
Is there any way to make that CMR method return sorted collection.
Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8919

The EJBQL in EJB 2.0 does not provide a support for this. EJB 2.1 does support ORDER BY clause. You can either use the proprietary Sort provided by the conatainer(this makes it difficult to port) or sort the collection.


Groovy
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Ordering collection returned from a CMR Method