In an experimental application I'm building, I have two entities, named
"Student" and "Class" (no name conflict, I use "ClassBean", "ClassHome", etc.).

I also have an entity named "StudentClassGrade".  This essentially reflects a
"valued association", referencing a Student and Class, and containing a Grade
value.

My first question is, what should be the types of the "Student" and "Class"
references in "StudentClassGrade" be?  Should they be the remote references, or
the primary keys?  The primary keys of "Student" and "Class" are, respectively,
"String ssn" and "String name".

Then, dependent on that, my PK class for "StudentClassGrade" will be a compound
key.  I'm fairly certain this should contain the two primary keys of the
associated Student and Class, but I'm not quite sure how this should work.

I'm having a lot of trouble finding good documentation and examples for this
sort of thing.  I've found umpteen examples of trivial beans and PKs, but
nothing like this.  I was hoping the new "Professional EJB" book would cover
this well, but it doesn't.

--
===================================================================
David M. Karr          ; Best Consulting
[EMAIL PROTECTED]   ; Java/Unix/XML/C++/X ; BrainBench CJ12P (#12004)

===========================================================================
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".

Reply via email to