In EJB 2.0 QL can we write something like this in finder query. where o.policy=?1 order by =?2 desc
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Sagar_Shah
Posted On:   Friday, July 30, 2004 07:08 AM

I want to sort the list of entity bean returned by finder methods based on more than one columns. In short want to do 'order by' on more an one column. I want to pass the column names to be sorted in the finder method as arguement and use the same in the order by clause. I am working in WSAD 5.1 and we are using EJB 2.0 in our project. Following is my finder query select object(o) from ClaimNoteEntity o where o.isClaim=?1 order by =?1 asc ,=?2 desc It gives compilation error at '=?1' phrase of the query. Can u give some solution to get it working    More>>

I want to sort the list of entity bean returned by finder methods based on more than one columns.

In short want to do 'order by' on more an one column.
I want to pass the column names to be sorted in the finder method as arguement and use the same in the order by clause.

I am working in WSAD 5.1 and we are using EJB 2.0 in our project.

Following is my finder query



select object(o) from ClaimNoteEntity o where o.isClaim=?1 order by =?1 asc ,=?2 desc




It gives compilation error at '=?1' phrase of the query.
Can u give some solution to get it working

   <<Less
About | Sitemap | Contact