Association Element in MethodInstances (BDCMetadata Schema)

Applies to: SharePoint Server 2010

Namespace: https://schemas.microsoft.com/windows/2007/BusinessDataCatalog

Schema: BDCMetadata

The Association element links related external content types within a system. For example, a customer is associated with a sales order in the AdventureWorks system: a customer makes sales orders. An Association holds pointers to the source and destination external content types and a pointer to the business logic (a MethodInstance object) that allows a client to get the destination external content type from the source external content type. The traversal of an Association is a method call on the external system.

In the BDC Model, the Association logic (MethodInstance) can be on any external content type, either source or destination or an unrelated external content type, provided the destination external content type belongs to the LobSystem that contains the Association method instance.

Warning

Note that when using SharePoint Designer 2010, you must create the Association operation on the destination external content type. This is a requirement of SharePoint Designer and modeling it the other way (on the source or another external content type) will not work.

BDC also supports multiple source external content type scenarios and one destination external content type scenario.

An Association method instance contains slots for the identifier values of the SourceEntity instance, and a slot for the identifier values of the DestinationEntity instances. Therefore, you must tag enough input TypeDescriptor objects with identifiers corresponding to each identifier of each external content type that is a source in the Association in the Association method. The IdentifierName attribute on an input TypeDescriptor object signals BDC to insert the identifier value of the EntityInstance of relevance before executing the method. For example, in an AssociationMethodInstance, the user has probably provided the identifier values for the source EntityInstance that he or she wants to retrieve. BDC will insert that value into this slot after fully instantiating this parameter by using all the default values.

BDC also supports Foreign Key pseudo-associations. Foreign Key pseudo-associations are not first-class associations. Consider a Web method that returns Customer, and that one of the fields of a Customer is the Key to the Address of the Customer. Also consider another web method that returns Address given its key. A metadata modeller may use this method as a Customer-Address Association method (possibly along with a Specific Finder of Address). Foreign key pseudo associations see that the target of this method is an Address, fetch the key of Address from the Returned Customer and then call this association Method to return the Address automatically.

Warning

Note that although BDC Model supports foreign key pseudo-associations, SharePoint Designer 2010 does not. Therefore, you cannot model foreign key pseudo-associations using SharePoint Designer.

The Association element accepts the following property.

Important

Properties are case-sensitive.

Properties

Property

Type

Description

Required

Default Value

Limits/Accepted Values

HideOnProfilePage

System.Boolean

Specifies whether the related external content type should be added to the profile page of the master external content type.

Optional

<Association Type = "String" Default = "Boolean" ReturnParameterName = "String" ReturnTypeDescriptorName = "String" ReturnTypeDescriptorLevel = "Integer" Name = "String" DefaultDisplayName = "String" IsCached = "Boolean"> </Association>

Attributes and Elements

The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute

Description

Type

Required.

The MethodInstanceType that specifies the type of the Association.

The following table lists the possible values for this attribute.

Value

Description

AssociationNavigator

The MethodInstance is an AssociationNavigator.

Associator

The MethodInstance is an Associator.

Disassociator

The MethodInstance is a Disassociator.

BulkAssociatedIdEnumerator

The MethodInstance is a BulkAssociatedIdEnumerator.

BulkAssociationNavigator

The MethodInstance is a BulkAssociationNavigator.

Default

Optional.

Specifies whether the Association is the default among all Associations sharing its type within the containing external content type. If set to true, the Association is the default among all Associations sharing its type within the containing external content type. If set to false, the Association is not the default among all Associations sharing its type within the containing external content type.

Default value: false

Attribute type: Boolean

ReturnParameterName

Optional.

The name of the parameter that contains the ReturnTypeDescriptor of the Association. The Direction attribute of the parameter must contain a value of either "Out", "InOut, or "Return".

Attribute type: String

ReturnTypeDescriptorName

Optional.

This has been deprecated. Use the ReturnTypeDescriptorPath instead.

Attribute type: String

ReturnTypeDescriptorLevel

Optional.

This has been deprecated. Use the ReturnTypeDescriptorPath instead.

Attribute type: Integer

ReturnTypeDescriptorPath

Optional.

The dotted path of the TypeDescriptor of the Association.

Attribute type: String

Name

Required.

The name of the Association.

Attribute type: String

DefaultDisplayName

Optional.

The default display name for the Association.

Attribute type: String

IsCached

Optional.

Specifies whether this Association is frequently used.

Default value: true

Attribute type: Boolean

Child Elements

Element

Description

LocalizedDisplayNames Element in MetadataObject (BDCMetadata Schema)

The LocalizedDisplayNames element specifies a list of localized names for the Association.

Properties Element in MetadataObject (BDCMetadata Schema)

The Properties element specifies the properties of the Association.

AccessControlList Element (BDCMetadata Schema)

The AccessControlList element specifies a set of access rights for the Association.

SourceEntity Element in Association (BDCMetadata Schema)

The SourceEntity element specifies the source external content type in the association.

DestinationEntity Element in Association (BDCMetadata Schema)

The DestinationEntity element specifies the destination external content type in the Association.

Parent Elements

Element

Description

MethodInstances Element in Method (BDCMetadata Schema)

The MethodInstances element that contains the Association.