If I have two tables A and B and the association between the two are maintained via a link table and a third table that has a parent/child relationship with one of the non-linked tables, what's the recommended best practice for the mapping files such that inserts and deletes cascade (bidirectional) between all of the associations happen correctly?
Table A: (Person)
Code:
ID (PK - integer)
Name (string)
Gender (byte)
Last Login (date)
Table B (Team):
Code:
ID (PK - integer)
TeamName (string)
TeamType (byte)
LocationID (FK to Location)
Third table: (Location)
Code:
ID (PK - integer)
Location Name (string)
Capacity (integer)
Link table: (PersonTeamLink)
Code:
PersonID
TeamID
Thanks,
Justin