I am using CMRs. and value objects using the @ejb.relation and @ejb.value-object xdoclet tags.
public abstract CustomerLocal getCustomer();
The generated CustomerCMP has the method implemented as
public CustomerVO getCustomerVO()
customerVO = new CustomerVO ();
customerVO .setName( getName() );
customerVO .setAddress( getAddress() );
catch (Exception e)
throw new javax.ejb.EJBException(e);
And as I was profiling the application, it made separate calls to the database to get the name and address fields.
So if there are about 10 fields in the table, it would make 10 calls instead of one sql statement to retrieve all the field values.
Can anyone solve this problem?