Proper way to define two way relations between two tables
问题 I have three tables: Employee (emp_id,name) Projects (pid,proj_status) Project_Allocation (pid,emp_id) To find the people belonging to my project: 1. I have my name, I query my emp_id. 2. Using my emp_id, I query (withRelated) for all my projects from Project_Allocation (completed ones as well) with a belongsTo relation defined on Projects 3. Then I pick the pid of the project having status as 'LIVE' 4. Now I pick all the models having this pid in Project_allocation. The issue I'm