I may be misinterpreting your question because this does appear to be an
issue
of fine grained versus
coarse grained component design. Why would you store the phone number as
an
entity bean and
not just a regular business object? Then you could just use a vector of
PhoneNumber objects in the
Person object.
For example
public class Person implements EntityBean {
private Vector myPhoneNumbers;
...
public void ejbLoad() {
// loads myPhoneNumbers from the db
..
}
public void ejbStore(){
//Stores the vector of phone numbers to the db
}
}
public class PhoneNumber { //Not an entity bean
private String myNumber;
public String getNumber(){ return myNumber;}
}
---------------------------------------------
Yes that is very true, but... Using WLS and using CMP (which is a very
simple member to column mapping solution) Its very fast and easy to create.
In fact reading a DBs schema info and generating a whole CRUD enabled
application is possible. So instead of doing BMP as you have I wan't to use
CMP and one table is one entity.
And as I said I know the implication and that its not a very nice component
design but I can write 20 entity beans when you have done 1.
Its as you said a question of fine- versus coarse grained design. It is
fine grained and that's how its going to be.
Regards
Erik
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".