Here's my situation I have three tables
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.
My opinion is that you should use relations (cmr fields).
PARENT_STUDENT is just a relation table.
Then giving a parent, you can get all the students and vice versa with a single query (find a parent or find a student).
Hope this helps you.