[bdc][error] importing association/method

Hello all :)

I'm trying to import an xml definition file into my ssp in moss2007.
i have few entities, among which Members and Personns, which are related as shown in the association in the end of the file.
Both entities have an 'id' field.
and i have the following error when importing:


Application definition import failed. The following error occurred: The IdentifierName Attribute of the TypeDescriptor named 'id' of the Parameter named 'Personns' of the Method named 'GetPersonnsFromMembers' of the Entity named 'dbo.Members' does not match any of the defined Identifiers for the Entity. Error was encountered at or just before Line: '399' and Position: '24'

<Entity EstimatedInstanceCount="0" Name="dbo.Members">
<Identifiers>
<Identifier Name="id" TypeName="System.Int32" />
</Identifiers>
<Methods>
<Method Name="Getdbo.Members">
<Properties>
<Property Name="RdbCommandText" Type="System.String">Select id,personnId,studies,experiences,extraInterest,profInterest,functionsId From dbo.Members Where (id&gt;=@GeneratedMinid) and (id&lt;=@GeneratedMaxid)</Property>
<Property Name="RdbCommandType" Type="System.Data.CommandType">Text</Property>
</Properties>
<FilterDescriptors>
<FilterDescriptor Type="Comparison" Name="id" />
</FilterDescriptors>
<Parameters>
<Parameter Direction="In" Name="@GeneratedMinid">
<TypeDescriptor TypeName="System.Int32" IdentifierName="id" AssociatedFilter="id" Name="id">
<DefaultValues>
<DefaultValue MethodInstanceName="dbo.MembersFinder" Type="System.Int32">0</DefaultValue>
<DefaultValue MethodInstanceName="dbo.MembersSpecificFinder" Type="System.Int32">0</DefaultValue>
</DefaultValues>
</TypeDescriptor>
</Parameter>
<Parameter Direction="In" Name="@GeneratedMaxid">
<TypeDescriptor TypeName="System.Int32" IdentifierName="id" AssociatedFilter="id" Name="id">
<DefaultValues>
<DefaultValue MethodInstanceName="dbo.MembersFinder" Type="System.Int32">9999999</DefaultValue>
<DefaultValue MethodInstanceName="dbo.MembersSpecificFinder" Type="System.Int32">9999999</DefaultValue>
</DefaultValues>
</TypeDescriptor>
</Parameter>
<Parameter Direction="Return" Name="dbo.Members">
<TypeDescriptor TypeName="System.Data.IDataReader, System.Data, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" Name="dbo.MembersDataReader" IsCollection="true">
<TypeDescriptors>
<TypeDescriptor TypeName="System.Data.IDataRecord, System.Data, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" Name="dbo.MembersDataRecord">
<TypeDescriptors>
<TypeDescriptor TypeName="System.Int32" IdentifierName="id" Name="id" />
<TypeDescriptor TypeName="System.Int32" Name="personnId" />
<TypeDescriptor TypeName="System.String" Name="studies" />
<TypeDescriptor TypeName="System.String" Name="experiences" />
<TypeDescriptor TypeName="System.String" Name="extraInterest" />
<TypeDescriptor TypeName="System.String" Name="profInterest" />
<TypeDescriptor TypeName="System.Int32" Name="functionsId" />
</TypeDescriptors>
</TypeDescriptor>
</TypeDescriptors>
</TypeDescriptor>
</Parameter>
</Parameters>
<MethodInstances>
<MethodInstance Name="dbo.MembersFinder" Type="Finder" ReturnParameterName="dbo.Members" ReturnTypeDescriptorName="dbo.MembersDataReader" ReturnTypeDescriptorLevel="0" />
<MethodInstance Name="dbo.MembersSpecificFinder" Type="SpecificFinder" ReturnParameterName="dbo.Members" ReturnTypeDescriptorName="dbo.MembersDataReader" ReturnTypeDescriptorLevel="0" />
</MethodInstances>
</Method>
<Method Name="GetPersonnsFromMembers">
<Properties>
<Property Name="RdbCommandText" Type="System.String">SELECT Personns.id, firstName, surName,personnalPhone, officePhone, adress, postalCode, city, countryId FROM Personns, Members WHERE Personns.id=Members.personnId and Members.id=</Property>
<Property Name="RdbCommandType" Type="System.String">Text</Property>
</Properties>
<Parameters>
<Parameter Direction="In" Name="@id">
<TypeDescriptor TypeName="System.Int32" IdentifierName="id" Name="id" />
</Parameter>
<Parameter Direction="Return" Name="Personns">
<TypeDescriptor TypeName="System.Data.IDataReader, System.Data, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" IsCollection="true" Name="PersonnsDataReader">
<TypeDescriptors>
<TypeDescriptor TypeName="System.Data.IDataRecord, System.Data, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" Name="PersonnsDataRecord">
<TypeDescriptors>
<TypeDescriptor TypeName="System.Int32" IdentifierEntityName="Personns" IdentifierName="id" Name="id">
<LocalizedDisplayNames>
<LocalizedDisplayName LCID="1033">id</LocalizedDisplayName>
</LocalizedDisplayNames>
</TypeDescriptor>
<TypeDescriptor TypeName="System.String" Name="firstName">
<LocalizedDisplayNames>
<LocalizedDisplayName LCID="1033">First Name</LocalizedDisplayName>
</LocalizedDisplayNames>
<Properties>
<Property Name="DisplayByDefault" Type="System.Boolean">true</Property>
</Properties>
</TypeDescriptor>
<TypeDescriptor TypeName="System.String" Name="surName">
<LocalizedDisplayNames>
<LocalizedDisplayName LCID="1033">Sur name</LocalizedDisplayName>
</LocalizedDisplayNames>
<Properties>
<Property Name="DisplayByDefault" Type="System.Boolean">true</Property>
</Properties>
</TypeDescriptor>
<TypeDescriptor TypeName="System.String" Name="personnalPhone">
<LocalizedDisplayNames>
<LocalizedDisplayName LCID="1033">personnal Phone</LocalizedDisplayName>
</LocalizedDisplayNames>
<Properties>
<Property Name="DisplayByDefault" Type="System.Boolean">true</Property>
</Properties>
</TypeDescriptor>
<TypeDescriptor TypeName="System.String" Name="officePhone">
<LocalizedDisplayNames>
<LocalizedDisplayName LCID="1033">office Phone</LocalizedDisplayName>
</LocalizedDisplayNames>
<Properties>
<Property Name="DisplayByDefault" Type="System.Boolean">true</Property>
</Properties>
</TypeDescriptor>
</TypeDescriptors>
</TypeDescriptor>
</TypeDescriptors>
</TypeDescriptor>
</Parameter>
</Parameters>
</Method>
</Methods>
</Entity>

<Association AssociationMethodEntityName="Members"
AssociationMethodName="GetPersonnsFromMembers"
AssociationMethodReturnParameterName="Personns"
Name="GetPersonnsFromMembers"
IsCached="true">
<SourceEntity Name="Members" />
<DestinationEntity Name="Personns" />
</Association>


why do i have this error ? since the Personns entity have the field 'id'

<Entity EstimatedInstanceCount="0" Name="dbo.Personns">
<Identifiers>
<Identifier Name="id" TypeName="System.Int32" />
</Identifiers>
...


[9443 byte] By [seth23] at [2008-2-8]
# 1

seth,

Quick review I found this which may be the issue

<Property Name="RdbCommandText" Type="System.String">SELECT Personns.id, firstName, surName,personnalPhone, officePhone, adress, postalCode, city, countryId FROM Personns, Members WHERE Personns.id=Members.personnId and Members.id=</Property>

You have missed the @id for the end should read

<Property Name="RdbCommandText" Type="System.String">SELECT Personns.id, firstName, surName,personnalPhone, officePhone, adress, postalCode, city, countryId FROM Personns, Members WHERE Personns.id=Members.personnId and Members.id=@id</Property>

Andrew

andrewwoodward at 2007-10-9 > top of Msdn Tech,SharePoint Products and Technologies,SharePoint - Business Data Catalog...
# 2
Ok, i've got over that since. right now i made an association between two tables and it's working just fine with two webparts connected need to go on with the 20 remaining tables-entities now

3questions though:

  • am i the only one trying to use BDC ?
  • is there any other way of testing the integrity of a mapping file ? (other than applying it in the ssp)
  • how am i supposed to import all that in one file ? since all my tables are connected (which is one of the reason why i'm using bdc), i've just checked, you need to import all that in one time (and organised entities), so in one and only file ...
  • organised entities means if one is using another, the other one has to be defined first. how do we do when we have circular dependencies ?
  • how is that that a well known and m$ certified company in France organise a training (that costs 1000euros for 2days) and does not even have answers to theses *simple* questions ? when i know that this company is the most advanced one in the m$ field and all associated software, it makes me even more sick
seth23 at 2007-10-9 > top of Msdn Tech,SharePoint Products and Technologies,SharePoint - Business Data Catalog...
# 3

Seth,

I know Nick Swan has been working very hard on the BDCMetaMan application to help with the creation of these big/complex files. They are currently releasing beta(s) for the developer and professional versions.

I recommend you download and try it, even if you just use the output as a starting point it should save significant time.

- No your not the only one, but you are part of the early wave of adopters and most are doing paid consultancy (hence not much community support)
- Not that I am aware of, but the error message is useful (perhaps MS could release a BDC stsadm command) or a new feature fro BDCMetaMan?
- Yes, one file and they get huge! - Reminds me of the schema.xml files of old :)
- Not sure if circular references are supported, you need to play with these, sorry
- As above your on the early wave and even the training company's have limited exposure to real world issues, this will improve as will the community

Andrew

andrewwoodward at 2007-10-9 > top of Msdn Tech,SharePoint Products and Technologies,SharePoint - Business Data Catalog...
# 4
thks for your precisions Andrew.

more questions since more issues.
I used the webpart that allow to get data from the url (tranmitting the id of an entity with the get url method), used to work with a 2 weeks old version of my mapping file, not any more and i can't find what changed since.
i have both entities A and B which have a relation with entity C (GetCFromAAndB). when I try and connect them through the webpart connetion, it's working just fine, but with the url getter webpart, it's not working. any idea ?

seth23 at 2007-10-9 > top of Msdn Tech,SharePoint Products and Technologies,SharePoint - Business Data Catalog...

SharePoint Products and Technologies

Site Classified