I have a question regarding the use of ejbSelect methods. I have two entity beans StudentEJB and CourseEJB which have a M:N relationship with each other with the studentId variable of StudentEJB being related to the courseNo variable of CourseEJB. Can ejbSelect methods be used to determine in such a case the courses that a student is enrolled in instead of using session tracking to track the student's id and then retrieve the courses based on studentId.
Plz. Reframd your question Again.
Plz. Reframe your question Again.
Anything is possible.
Well, not ANYTHING.
In ur case Student Entity registed with many courses [CoursesBean] . by using 1:N relationship implemented in deployment descriptor.
public class Student implements EntityBean
public abstract void setCourse (Collection Courses)
public abstract Collection getCourse ()
<ejb-relation-name> student-course </ejb-relation-name>
<ejb-relationship-rolesource> Student </ejb-relationship-rolesource>