我正在生成一个sharepoint 2010 bdc model xml文件以及来自模型1st LLBLGen framework / C#.net 3.5项目的实体和相关服务类。当我在部署BDC解决方案时突然开始收到此错误时,一切进展顺利;
“错误178在部署步骤中发生错误'添加解决方案':无法为每个ILobSystem对象创建超过'500个'IEntity对象。”
它已经使用当前的实体数量进行了部署(在修改注册表以扩展超时设置之后)。我找不到任何关于MSDN中的IEntity对象限制的引用,也没有通过谷歌,并尝试以各种方式更改生成的xml文件进行测试。如果我删除实体,则错误会转移到下一个实体的开头。 Visual Studio只使用有关datetime数据类型的警告(显然已知问题)来构建解决方案。
我只定义了59个实体。其中一些在继承层次结构中,并且在模型中表达了许多FK关系。我的模型中有太多实体对我没有任何意义。我还有更多想补充的内容。我在每个实体上都包含EstimatedInstanceCount =“10000”,但这似乎没有任何效果。事实上,我认为这是默认的。模型文件非常大,但我将包含以下单个实体片段,以供参考生成的代码。
<Entity Name="Load" Namespace="SharePoint.DataConnector.VoyagerModel" EstimatedInstanceCount="10000" Version="1.0.0.26">
<Properties>
<Property Name="Class" Type="System.String">SharePoint.DataConnector.VoyagerModel.LoadService, VoyagerModel</Property>
</Properties>
<Identifiers>
<Identifier Name="Id" TypeName="System.Int32" />
<!-- TODO: Change the name of the ID and if needed the TypeName of your identifier. -->
</Identifiers>
<Methods>
<!-- start finder method -->
<Method Name="ReadList">
<!-- TODO: Change the name of the method if needed. -->
<Parameters>
<Parameter Direction="Return" Name="returnParameter">
<TypeDescriptor TypeName="System.Collections.Generic.IEnumerable`1[[SharePoint.DataConnector.VoyagerModel.Load, VoyagerModel]]" IsCollection="true" Name="LoadList">
<TypeDescriptors>
<TypeDescriptor Name="Load" TypeName="SharePoint.DataConnector.VoyagerModel.Load, VoyagerModel">
<TypeDescriptors>
<TypeDescriptor Name="Id" TypeName="System.Int32" IdentifierName="Id" IsCollection="false" ReadOnly="false" />
<!-- TODO: Add TypeDescriptors when you add properties to Load. -->
<TypeDescriptor Name="OrderId" IsCollection="false" ReadOnly="false" TypeName="System.Int32" />
<TypeDescriptor Name="Status" IsCollection="false" ReadOnly="false" TypeName="System.String" />
<TypeDescriptor Name="DriverId" TypeName="System.Int32" IdentifierEntityName="Driver" IdentifierEntityNamespace="SharePoint.DataConnector.VoyagerModel" IdentifierName="Id" IsCollection="false" />
</TypeDescriptors>
</TypeDescriptor>
</TypeDescriptors>
</TypeDescriptor>
</Parameter>
</Parameters>
<MethodInstances>
<MethodInstance Type="Finder" ReturnParameterName="returnParameter" Default="true" Name="ReadList" DefaultDisplayName="Load List">
<Properties>
<Property Name="RootFinder" Type="System.String">x</Property>
</Properties>
</MethodInstance>
</MethodInstances>
</Method>
<!-- end finder method -->
<!-- start specific finder method -->
<Method Name="ReadItem">
<Parameters>
<Parameter Direction="In" Name="id">
<TypeDescriptor TypeName="System.Int32" IdentifierName="Id" Name="Id" IsCollection="false" />
</Parameter>
<Parameter Direction="Return" Name="returnParameter">
<TypeDescriptor TypeName="SharePoint.DataConnector.VoyagerModel.Load, VoyagerModel" Name="Load">
<TypeDescriptors>
<TypeDescriptor Name="Id" TypeName="System.Int32" IdentifierName="Id" IsCollection="false" ReadOnly="false" />
<!-- TODO: Add TypeDescriptors when you add properties to Load. -->
<TypeDescriptor Name="OrderId" TypeName="System.Int32" IsCollection="false" />
<TypeDescriptor Name="Status" TypeName="System.String" IsCollection="false" />
<TypeDescriptor Name="DriverId" TypeName="System.Int32" IdentifierEntityName="Driver" IdentifierEntityNamespace="SharePoint.DataConnector.VoyagerModel" IdentifierName="Id" IsCollection="false" />
</TypeDescriptors>
</TypeDescriptor>
</Parameter>
</Parameters>
<MethodInstances>
<MethodInstance Type="SpecificFinder" ReturnParameterName="returnParameter" Default="true" Name="ReadItem" DefaultDisplayName="Read Load" />
</MethodInstances>
</Method>
<Method Name="Create">
<Parameters>
<Parameter Name="returnLoad" Direction="Return">
<TypeDescriptor Name="ReturnLoad" TypeName="SharePoint.DataConnector.VoyagerModel.Load, VoyagerModel">
<TypeDescriptors>
<TypeDescriptor Name="Id" TypeName="System.Int32" IdentifierName="Id" IsCollection="false" ReadOnly="false" />
<TypeDescriptor Name="OrderId" TypeName="System.Int32" IsCollection="false" />
<TypeDescriptor Name="Status" TypeName="System.String" IsCollection="false" />
<TypeDescriptor Name="DriverId" TypeName="System.Int32" IdentifierEntityName="Driver" IdentifierEntityNamespace="SharePoint.DataConnector.VoyagerModel" IdentifierName="Id" IsCollection="false" />
</TypeDescriptors>
</TypeDescriptor>
</Parameter>
<Parameter Name="newLoad" Direction="In">
<TypeDescriptor Name="NewLoad" TypeName="SharePoint.DataConnector.VoyagerModel.Load, VoyagerModel">
<TypeDescriptors>
<TypeDescriptor Name="Id" IdentifierName="Id" IsCollection="false" ReadOnly="false" TypeName="System.Int32" CreatorField="false" />
<TypeDescriptor Name="OrderId" TypeName="System.Int32" IsCollection="false" CreatorField="true" />
<TypeDescriptor Name="Status" TypeName="System.String" IsCollection="false" CreatorField="true" />
<TypeDescriptor Name="DriverId" TypeName="System.Int32" IdentifierEntityName="Driver" IdentifierEntityNamespace="SharePoint.DataConnector.VoyagerModel" IdentifierName="Id" IsCollection="false" />
</TypeDescriptors>
</TypeDescriptor>
</Parameter>
</Parameters>
<MethodInstances>
<MethodInstance Name="Create" Type="Creator" ReturnParameterName="returnLoad" ReturnTypeDescriptorPath="ReturnLoad" />
</MethodInstances>
</Method>
<Method Name="Delete">
<Parameters>
<Parameter Name="id" Direction="In">
<TypeDescriptor Name="Id" TypeName="System.Int32" IdentifierEntityName="Load" IdentifierEntityNamespace="SharePoint.DataConnector.VoyagerModel" IdentifierName="Id" />
</Parameter>
</Parameters>
<MethodInstances>
<MethodInstance Name="Delete" Type="Deleter" />
</MethodInstances>
</Method>
<Method Name="Update">
<Parameters>
<Parameter Name="Load" Direction="In">
<TypeDescriptor Name="Load" TypeName="SharePoint.DataConnector.VoyagerModel.Load, VoyagerModel">
<TypeDescriptors>
<TypeDescriptor Name="Id" TypeName="System.Int32" IdentifierName="Id" IsCollection="false" ReadOnly="false" />
<TypeDescriptor Name="OrderId" TypeName="System.Int32" IsCollection="false" UpdaterField="true" />
<TypeDescriptor Name="Status" TypeName="System.String" IsCollection="false" UpdaterField="true" />
<TypeDescriptor Name="DriverId" TypeName="System.Int32" IdentifierEntityName="Driver" IdentifierEntityNamespace="SharePoint.DataConnector.VoyagerModel" IdentifierName="Id" IsCollection="false" />
</TypeDescriptors>
</TypeDescriptor>
</Parameter>
</Parameters>
<MethodInstances>
<MethodInstance Name="Update" Type="Updater" />
</MethodInstances>
</Method>
<!-- start related entity methods -->
<Method Name="LoadToOrders">
<Parameters>
<Parameter Name="id" Direction="In">
<TypeDescriptor Name="Id" TypeName="System.Int32" IdentifierEntityName="Load" IdentifierEntityNamespace="SharePoint.DataConnector.VoyagerModel" IdentifierName="Id" ForeignIdentifierAssociationEntityName="Load" ForeignIdentifierAssociationEntityNamespace="SharePoint.DataConnector.VoyagerModel" ForeignIdentifierAssociationName="LoadToOrdersAssociationNavigator" />
</Parameter>
<Parameter Name="orderList" Direction="Return">
<TypeDescriptor Name="OrderList" TypeName="System.Collections.Generic.IEnumerable`1[[SharePoint.DataConnector.VoyagerModel.Order, VoyagerModel]]" IsCollection="true">
<TypeDescriptors>
<TypeDescriptor Name="Order" TypeName="SharePoint.DataConnector.VoyagerModel.Order, VoyagerModel">
<TypeDescriptors>
<TypeDescriptor Name="Id" IsCollection="false" ReadOnly="true" TypeName="System.Int32" IdentifierEntityName="Order" IdentifierEntityNamespace="SharePoint.DataConnector.VoyagerModel" IdentifierName="Id" />
</TypeDescriptors>
</TypeDescriptor>
</TypeDescriptors>
</TypeDescriptor>
</Parameter>
</Parameters>
<MethodInstances>
<Association Name="LoadToOrdersAssociationNavigator" Type="AssociationNavigator" ReturnParameterName="orderList" ReturnTypeDescriptorPath="OrderList">
<SourceEntity Name="Load" Namespace="SharePoint.DataConnector.VoyagerModel" />
<DestinationEntity Name="Order" Namespace="SharePoint.DataConnector.VoyagerModel" />
</Association>
</MethodInstances>
</Method>
<Method Name="LoadToDriver">
<Parameters>
<Parameter Name="id" Direction="In">
<TypeDescriptor Name="Id" TypeName="System.Int32" IdentifierEntityName="Load" IdentifierEntityNamespace="SharePoint.DataConnector.VoyagerModel" IdentifierName="Id" ForeignIdentifierAssociationEntityName="Load" ForeignIdentifierAssociationEntityNamespace="SharePoint.DataConnector.VoyagerModel" ForeignIdentifierAssociationName="LoadToDriverAssociationNavigator" />
</Parameter>
<Parameter Name="driverList" Direction="Return">
<TypeDescriptor Name="DriverList" TypeName="System.Collections.Generic.IEnumerable`1[[SharePoint.DataConnector.VoyagerModel.Driver, VoyagerModel]]" IsCollection="true">
<TypeDescriptors>
<TypeDescriptor Name="Driver" TypeName="SharePoint.DataConnector.VoyagerModel.Driver, VoyagerModel">
<TypeDescriptors>
<TypeDescriptor Name="Id" IsCollection="false" ReadOnly="true" TypeName="System.Int32" IdentifierEntityName="Driver" IdentifierEntityNamespace="SharePoint.DataConnector.VoyagerModel" IdentifierName="Id" />
</TypeDescriptors>
</TypeDescriptor>
</TypeDescriptors>
</TypeDescriptor>
</Parameter>
</Parameters>
<MethodInstances>
<Association Name="LoadToDriverAssociationNavigator" Type="AssociationNavigator" ReturnParameterName="driverList" ReturnTypeDescriptorPath="DriverList">
<SourceEntity Name="Load" Namespace="SharePoint.DataConnector.VoyagerModel" />
<DestinationEntity Name="Driver" Namespace="SharePoint.DataConnector.VoyagerModel" />
</Association>
</MethodInstances>
</Method>
<!-- end related entity methods -->
</Methods>
<AssociationGroups>
<AssociationGroup Name="DriverToLoadAssociation">
<AssociationReference AssociationName="LoadToDriverAssociationNavigator" Reverse="true" />
</AssociationGroup>
</AssociationGroups>
</Entity>
感谢您的帮助!
答案 0 :(得分:0)
好的,显然没有太多人在使用大型企业级BDC模型?我很害怕......
我在MSDN中找到了我的答案。如果你去MSDN你会发现详细的LobSystem限制;
单独来说,这些听起来不是问题。我使用单个Lob实例,我只有59个实体。平均每个关联8个左右。但是如何计算Max关联我不知道。关联的每一方都算作一个实例吗?每个对该关联的引用是否都会添加引用?
我希望能够更深入地了解LobSystem架构。
与此同时,我将把我的模型拆分为单独的模式组,并修改我的模板以在bdc模型模式文件中创建关联,这完全符合不同的LobSystem模型。
如果有人知道为什么这不起作用,请立即停止我!
答案 1 :(得分:0)
我实际上遇到了你所描述的同样的问题,当时也找不到有关它的大量信息。但是,您引用的MSDN文章适用于SharePoint 2007和BDC模型,而不适用于Business Connectivity Services。
如果您只有59个实体,则在撤回解决方案后很可能未完全删除LobSystem。模型和实体确实被删除,但LobSystem本身仍然存在。您可以从管理中心进行检查。因此,您执行的每个新部署都会将实体再次添加到系统中并提高“实体数量”,达到500限制的速度要快得多。
尝试手动删除LobSystem(通过管理中心),以便在部署期间创建新的LobSystem。