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

KeyValue
AssemblyARCQuery
DocFragTypeClass
NameForeignKey
NamespaceARCQuery
TypeForeignKey

ClassAttribute

KeyValue
AssemblyNameARCQuery
BaseTypesCompoundKey
ClassNamespaceARCQuery
ClassTypeForeignKey

Can find related values, through compound field names.

Like for 'Order', it can find 'Customer.FirstName' (assuming 'Order' contains 'CustomerId').
Can relate several steps like for 'OrderLine', 'Order.Customer.FirstName'.
See ToOne.

Can also traverse 'the other' way (ToMany), like for 'Customer', 'Order.OrderLine.Sum.Sum()' (assuming 'Order' contains 'CustomerId' and 'OrderLine' contains 'OrderId').

Note that in a series of mixed traversal (that is containing both ToMany and ToOne) each ToOne traversal will be limited to distinct primary keys.
For instance (from the ARNorthwind example database), for query 'Territory/SELECT EmployeeTerritory.Employee.Order.OrderLine.Sum()' only unique 'EmployeeId' will be used before looking up 'Order'.
(this does not necessarily make the query above meaningful though).

Foreign key can be used in combination with EntityMethodKey, NewKey and FunctionKey.
For instance like 'Order/SELECT ShippedDate, Sum, Customer.Name' were 'Customer.Name' is an EntityMethodKey combining FirstName, LastName and CompanyName).

This is an not an expandable concept (class is sealed).
In other words, this class contains all the relevant functionality and you are not expected to implement anything specific in your ApplicationSpecificCode.

Note: In queries like
"Order/SELECT CustomerId, Created, Amount/WHERE Customer.FirstName = 'John'"
the foreign-key 'CustomerId' should be included as shown in here (see QueryExpressionSelect).
If you only do
"Order/SELECT Created, Amount/WHERE Customer.FirstName = 'John'"
then the link to Customer is not available.
(For the example given above it would of course have been more natural to just write:
"Order/WHERE Customer.FirstName = 'John'/SELECT Created, Amount"
)
See also MemberEntityKey.

Edit


Generated 2024-03-29 06:26:47.765 UTC