Hi!
In a previous post (12586), Bobby Diaz gave a good example of a Many-To-Many List Relationship. In that example, based on the relationship descirption (see below), I assume that the link table had the following format:
CustomerCustomerDemo (CustomerID PK, CustomerTypeID PK)
but what if it had the following format:
CustomerCustomerDemo (CustomerCustomerDemoID PK, CustomerID FK, CustomerTypeID FK)
Would this work with the ManyToManyListRelationship?
How should the LinkeMember then be defined?
Note: A DBA I know recommanded that link tables have their own primary key, hence the three keys.
Here is the ManyToManyListRelationship used in Bobby's example:
<data:ManyToManyListRelationship ID="CustomerCustomerDemoRelationship" runat="server">
<%-- represents the Customers table --%>
<PrimaryMember runat="server"
DataSourceID="CustomersDataSource"
EntityKeyName="CustomerID"
/>
<%-- represents the CustomerCustomerDemo link table --%>
<LinkMember runat="server"
DataSourceID="CustomerCustomerDemoDataSource"
EntityKeyName="CustomerID"
ForeignKeyName="CustomerTypeID"
/>
<%-- represents the CustomerDemographics table --%>
<ReferenceMember runat="server"
DataSourceID="CustomerDemographicsDataSource"
ListControlID="CustomerDemographicsList"
EntityKeyName="CustomerTypeID"
/>
</data:ManyToManyListRelationship>
Cheers!
JF