Share via


Dependent 要素 (SSDL)

ストア スキーマ定義言語 (SSDL) の Dependent 要素は ReferentialConstraint 要素の子であり、外部キー制約 (参照に関する制約とも呼ばれる) の依存 End を定義します。 Dependent 要素は、1 つ以上の主キー列を参照する、テーブル内の 1 つ以上の列を指定します。 PropertyRef 要素は、参照される列を指定します。 Principal 要素は、Dependent 要素で指定されている列が参照する主キー列を指定します。

The Dependent element can have the following child elements (in the order listed):

適用可能な属性

The following table describes the attributes that can be applied to the Dependent element.

属性名 必須 Value

Role

有効

対応する End 要素Role 属性 (使用されている場合) と同じ値です。それ以外の場合は、参照している列を含んでいるテーブルの名前です。

Ee705452.note(ja-jp,VS.100).gif注 :
Dependent 要素には、任意の数の annotation 属性 (カスタム XML 属性) を適用できます。However, custom attributes may not belong to any XML namespace that is reserved for CSDL.カスタム属性の完全修飾名は一意である必要があります。

The following example shows an Association element that uses a ReferentialConstraint element to specify the columns that participate in the FK_CustomerOrders foreign key constraint. Dependent 要素は、制約の依存 End として Order テーブルの CustomerId 列を指定します。

<Association Name="FK_CustomerOrders">
  <End Role="Customers" 
       Type="ExampleModel.Store.Customers" Multiplicity="1">
    <OnDelete Action="Cascade" />
  </End>
  <End Role="Orders" 
       Type="ExampleModel.Store.Orders" Multiplicity="*" />
  <ReferentialConstraint>
    <Principal Role="Customers">
      <PropertyRef Name="CustomerId" />
    </Principal>
    <Dependent Role="Orders">
      <PropertyRef Name="CustomerId" />
    </Dependent>
  </ReferentialConstraint>
</Association>

参照

概念

エンティティ フレームワークの概要
SSDL 仕様

その他のリソース

CSDL、SSDL、および MSL 仕様
ADO.NET Entity Data Model Tools