Pages

Wednesday, May 4, 2011

Creating BCS External Content Type Association in SPD - primary/foreign key limitation

While experimenting with External Content Types and Associations between them  using database tables in SharePoint Designer 2010, I encountered a problem where SPD was giving me the following error message:

The related identifier customerID is mapped to field customerID which is already marked as an identifier of this external content type.

Well, ok, so what is the problem with that? Can I not use a field that is already an indetifier/primary key in the child table as a foreign key also?
After some searching I found a nice blog post which helped answer this:
Tooling Associations in SharePoint Designer 2010
As it turns out, the answer is "no, it can't", this is not supported in SPD.

What should we do then?
We'll have to adjust the BDC Model XML by hand, or set up a simple Web service for our database which circumvents the second Primary Key requirement.

Microsoft also has an article on this:
Association Element in MethodInstances (BDCMetadata Schema)

No comments:

Post a Comment