Windows Vista Beta | WinVistaBeta.com - Message | Navigation Property

October 06, 2008  
Subject: Navigation Property
Group: microsoft.public.windows.developer.winfx.winfs
Date: 3/22/2006 11:48:30 PM
From: "Jrme Piquot" [Email Address Protection]

When i put the following navigation property in two objects when i add a
link in one do i see it in the other navigation property?



<EntityType Name="ProductCollection" BaseType="Storage.Folder">

<NavigationProperty Name="InventoryItems"
Association="ProductCollectionItems" FromRole="ProductCollection"
ToRole="InventoryItem">

<Documentation>Navigational property for exposing inventory items linked to
the product collection."</Documentation>

</NavigationProperty>

</EntityType>

<EntityType Name="InventoryItem" BaseType="Storage.Item">

<NavigationProperty Name="ProductCollections"
Association="ProductCollectionItems" ToRole="ProductCollection"
FromRole="InventoryItem">

<Documentation>Navigational property for exposing product collections linked
to the inventory item."</Documentation>

</NavigationProperty>

<Property Name="Code" Type="Storage.String" Size="64" Nullable="false"
ChangeUnit="Storage.Item.Item" />

<Property Name="PrintName" Type="Storage.String" Size="255" Nullable="true"
ChangeUnit="Storage.Item.Item" />

</EntityType>

<EntityType Name="ProductCollectionItemsLink" BaseType="Storage.Link">

<Documentation>Link type used to designate references member of a
trademark.</Documentation>

<PropertyConstraint Property="SourceRef"
Type="Ref(KProduct.ProductCollection)" />

<PropertyConstraint Property="TargetRef" Type="Ref(KProduct.InventoryItem)"
/>

</EntityType>

<Association Name="ProductCollectionItems">

<Documentation>

This is a link-based association which returns the list of references for a
given trademark.

</Documentation>

<End Role="ProductCollection" PluralRole="ProductCollections"
Type="KProduct.ProductCollection" />

<End Role="InventoryItem" PluralRole="InventoryItems"
Type="KProduct.InventoryItem" />

<AssociationEntity Type="ProductCollectionItemsLink"
Role="ProductCollectionItem" PluralRole="ProductCollectionItems">

<Reference FromRole="ProductCollectionItem" ToRole="ProductCollection"
Property="SourceRef" />

<Reference FromRole="ProductCollectionItem" ToRole="InventoryItem"
Property="TargetRef" />

</AssociationEntity>

</Association>



Back