That would work fine but would be very expensive.
 
I would create a getCount() method and have that method do a simple JDBC call and return the count. This way the container does not have the added overhead of creating/marshalling the collection.
 
----- Original Message -----
Sent: Wednesday, June 13, 2001 6:56 PM
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