• 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
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

EJBQL PROBLEMS

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey
Can anybody help on these issues related to EJB QL in Weblogic 6.0 SP1
1. Can I use COUNT function in EJB QL. If not what is the work around. Refer Query1
2. Can I use NESTED queries in EJB QL. If not what is the work around. Refer Query1 & Query2
3. Can I use MAX function in EJBQL. If not what is the work around. Refer Query2
4. Can I use ORDER BY DESC in EJB QL. If not what is the work around. Refer Query3
Query1
select * from ClaimBeanTbl t1, ClaimSpecialistsBeanTbl t2
where t1.objId = t2.claimObjId
and t2.specialistObjId = ?
and t2.endDate = 'empty'
and (select count (*) from ClaimSpecialistsBeanTbl
where claimObjId = t1.objId) = 1
and t2.isNew = 1
Query2
select a.objid from paymentbeantbl a
where a.claimobjid = ?
and a.paymentdate =
(select max (b.paymentdate) from PaymentBeantbl b where b.claimobjid = ?)

Query3
select a.objid from paymentbeantbl a where a.claimobjid = ? order by a.paymentdate DESC
The restrictions/limitations of EJB QL are too rigid. We expected EJB 2.0 and in turn EJB QL will ease the process of development but it is indeed giving us tough times and is a REAL NIGHTMARE. I wonder whether shifting from EJB 1.1 to EJB 2.0 is the right decision in such circumstances.
Any help on this will be highly appreciated.
 
reply
    Bookmark Topic Watch Topic
  • New Topic