Dear elephatwalker,
 
It looks like a big perfomance hit for both database and container to count entities in such a way. Another decision is to talk directly to db, which is also not good.
 
Browsing EJB 2.0 documentation, I found out that there is an ejbSelect() method that allows to perform queries that return results of arbitrary types. However, I could not find any good examples showing how to use it.
 
WBR,
Sergei
----- Original Message -----
Sent: Thursday, June 14, 2001 1:56 AM
Subject: RE: Counting CMP entities

Sergei,
 
Do a findAll() ,you get a collection. Then do a result.size(), that should do it.
 
Regards,
 
the elephantwalker
 
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Sergei Batiuk
Sent: Tuesday, June 13, 2000 3:25 PM
To: Orion-Interest
Subject: Counting CMP entities

Is it possible to count the number of records in a table with a CMP?
 
WBR,
Sergei

Reply via email to