so how come finder methods aren't sufficient for returning lists of entities?
Take a situation where I want to run a query against a customer database. Something like....
select customerID, customerName from customers
It does'nt make any sense to retrieve the entire Customer object. Also what happens if the customer object is a composite of things like...
|--- Customer Address Info
|--- Customer Order Info
|--- Customer Contacts
A finder would bring back huge amounts of data that simply isn't relevant.
I was sort of expecting EJB to include some of logical entity to data source mapping structure for all aspexcts of the data model - not just entity CRUD.
The few books I've read suggest using a DAO pattern for masking JDBC calls. Again this seems detached from the container based persistence.
See CMP2 spec and Dain's CMP2 docu, should answer your questions, e.g. how to configure the CMP engine to fetch just the information you require.
Also try the CMP forum, Dain will most likely explain how the persistence works in detail.
In short, no you don't have to fetch huge amounts of data as you describe.