Adding a foreign key in a complex type
About this task
When defining a complex type, you can add a foreign key element in the complex type. In this case, any entity or element using this complex type or using a complex type which extends this complex type can reuse the foreign key.
The following example shows how to add a foreign key AddressFK to the complex type AddressType created in Adding complex type elements to entities which are extended by EUAddressType and USAddressType.
Procedure
Results
When you added a foreign key element to a complex type, any element or entity which uses this complex type or uses complex types extending this complex type will reuse the foreign key as well.
For example, suppose you have a Region entity in the DStar data model, and now you want to add a new element of the complex type AddressType to the Region entity. The foreign key AddressFK will be reused.
If you add a new element of EUAddressType to the Region entity, the foreign key AddressFK is also reused.