[ROOT] / doc / toc / ARCQuery / Class / ForeignKey / IPRelationsKeysPointingTo

Contains, for each (entity type) key, a list of entity types with foreign keys pointing to that entity type.

Shows how all the IP classes relate to each other.

Used to automatically create links to related objects in a dynamic context.
(see for instance LinkInsertionInDocumentation and QueryExpressionRel.)

Depends on AllIPDerivedTypes (the static defined schema), that is does not attempt to dynamically discover any structures.

Key is the very short string representations of the type (as generated from ToStringVeryShort)
Value is List<-EntityTypeAndKey-> with corresponding types that refer to that type.

See also -EntityTypeAndKey-, IPRelationsKeysPointingFrom and ForeignKeyDirection.


If we have classes Customer, Order and SupportTicket and property keys OrderP.CustomerId and SupportTicketP.CustomerId then the entry for the key 'Customer' would be like new List<EntityTypeAndKey> { "Order CustomerId", 'SupportTicket CustomerId' }.

This may be used to dynamically and automatically create links to related objects. For instance for context 'Customer/42' it will (with the help of this information) be possible to create corresponding links 'Order/WHERE CustomerId = 42' and 'SupportTicket/WHERE CustomerId = 42'.

Relations defined with PKRelAttribute (ForeignEntity) is also taken into account.
For instance for Employee there might be a key EmployeeP.SupervisorId pointing to another Employee.
TODO: Document use of OppositeTerm in such cases.

Note that as of Jun 2020 this concept relies on predefined property keys (PropertyKeyEnum).
There is however in principle nothing wrong with dynamically finding the same information, as long as 'standardized' names are used for foreign keys, like 'Order/1968/CustomerId = Customer/42' for instance.
TODO: Consider implementation of such a dynamic discovery.


Generated 2022-05-20 10:18:26.189 UTC