Hi, I've tried to work this out but keep running into a brick wall, hopefully am not missing something obvious.
I've got a many to many relationship between Employer and Employee set up no problem using a join table called employer_employee with foreign keys of 'employer_id' and 'employee_id'. This returns lists of employees associated with employers and vice versa
I aso have a table called employee_performance which has foreign keys of 'employer_id' and 'employee_id' and additional columns of 'test_date' and 'score'.
How do I set up a relationship between employer/employee and this employee_performance table so that I only bring back the employee performance rows related to the employer and employee
for example employer returns a list of employees and each employee return a list of performance results for that employer/employee combination?
I can create a mapping between employee and employee_performance but I'm not sure how to feed in the employer ID so I can filter out records.
Thanks in advance for any help
Euan
|