ACDC wrote
I wonder why Aware does not create these automatically, just to be more compatible with outside tools.
Thank you for this solution.
Anthony
At a guess part of the reason is that it would be a very inconsistent implementation and hard to do in a bidirectional way.
The management of peer multiple relationships would be handled in SQL by an explicit intermediary tables but in AIM is handled by a solitary table per BO
For example
Pets have multiple People
People have multiple Pets
In SQL this would be handled by the following tables
Pets
People
PetPeople
If Pets also have multiple Vets and
Vets have multiple Pet clients then SQL would have another table
PetVetClient
AIM does not do this and instead (depending on where you create the peer relationships from) would create a second Pets_Ref table to manage the relationship with
pets_RID, pets_RMA, pets_REN
One of these is the ID in the relationship, one describes one side of the relationship (Pets) and the other describes the other side of the relationship (People or Vets). I cannot offhand remember which is RMA and which is REN.
If you created a foreign key onto this hidden table you'd get a situation where someone might think they can write via SQL to this table but would lack the filter of what type of BO. If you point a report writer at the table you'd also get a really confused view of relationships.
I am guessing that this is in part why BO.id is universally unique across AIM.