1 Reply Latest reply on Feb 9, 2004 2:36 PM by sesques

    [newbie] EJB-QL

    Jason L. van Brackel Newbie

      Here's my situation I have three tables

      PARENT
      parentid pk
      contactid fk
      addressid fk
      username unique
      password

      STUDENT
      studentid pk
      etc...

      PARENT_STUDENT - (Join Table)
      studentid pk fk
      parentid pk fk

      I have created basic cmp beans for all three tables. I was wondering how I could possibly phrase an finder query to get the students from the parents based on the parent_student mapping. Do I have to findByUsername on the ParentBean on login then findByParentID on the ParentStudentBean the do a findByStudentID for each result in the findByParentID query? or can I use some kind of join like in SQL?

      Any help would be appreciated.

      Jason