I am trying to build my first non-simple entity bean, however, I'm having some
problems.
What I have are people and awards.
People is a simple table with only a "name" field and primary key.
Awards is a simple table with only a "name" field and primary key.
Since the relationship between people and awards is M x N, I have a relationship
table which describes what people have which awards.
My goal is to have an EB through which I can manipulate and view the people and
their awards.
My initial thought is to simply put a
private Enumeration awards;
as a instance variable of the PeopleBean. But I keep reading everywhere that an
entity bean should represent 1 row of data from the data base. Placing this
enumeration in the PeopleBean would mean that it represents n rows (1 for each
award the person has won)
The remote interface I would like to have for people is
String getName();
Enumeration getAwards();
The fact that I want an enumeration of awards back makes me think that I should
also have an Award EB that has a finder method suck as findAwardsByPerson();
How should I handle this situation? Is creating an AwardBean the "proper" thing
to do?
--shawn
===========================================================================
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".