Complex types may be used to semantically structure an entity type, e.g. grouping an Amount and a CurrencyCode into a complex type MonetaryAmount.
Properties of complex types need to take the role of a dependent in a referential constraint, expressing e.g. that the CurrencyCode of the above complex type must only take values defined by the key property Code of a Currency entity type:
<ReferentialConstraint>
<Principal Role="Currency">
<PropertyRef Name="Code" />
</Principal>
<Dependent Role="OrderItem">
<PropertyRef Name="ItemPrice/CurrencyCode" />
</Dependent>
</ReferentialConstraint>